From patchwork Fri Jan 26 17:13:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 59437 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2586F27BBEA; Fri, 26 Jan 2024 17:15:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, NORMAL_HTTP_TO_IP,NUMERIC_HTTP_ADDR,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 30EEF27BBE2 for ; Fri, 26 Jan 2024 17:15:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTPn7-0000dE-F1; Fri, 26 Jan 2024 12:14:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTPn6-0000ca-2w for guix-patches@gnu.org; Fri, 26 Jan 2024 12:14:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTPn5-0004oW-Qy for guix-patches@gnu.org; Fri, 26 Jan 2024 12:14:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTPnB-0004DK-Sk for guix-patches@gnu.org; Fri, 26 Jan 2024 12:15:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68680] [PATCH mumi v4 1/4] README.org: Add new sections to help newcomers get started. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Jan 2024 17:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68680@debbugs.gnu.org Cc: rekado@elephly.net, arunisaac@systemreboot.net, Maxim Cournoyer Received: via spool by 68680-submit@debbugs.gnu.org id=B68680.170628925716017 (code B ref 68680); Fri, 26 Jan 2024 17:15:01 +0000 Received: (at 68680) by debbugs.gnu.org; 26 Jan 2024 17:14:17 +0000 Received: from localhost ([127.0.0.1]:52582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTPmS-0004AB-OB for submit@debbugs.gnu.org; Fri, 26 Jan 2024 12:14:17 -0500 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]:53603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTPmR-00049q-Iu for 68680@debbugs.gnu.org; Fri, 26 Jan 2024 12:14:16 -0500 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-783d8dff637so37808585a.3 for <68680@debbugs.gnu.org>; Fri, 26 Jan 2024 09:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706289243; x=1706894043; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3mHlKfb9Em9U1xMi4tLPjXlA5x9CMdBqSpo53CEwIhE=; b=b0zOsOcwNVaG3MM4GUqCrCtGaZggu57wUuEgWP9X+t5MsNgPthWrGaK6jGrjyqDjqm DgVH4Lt2f11UuokpOj5HnIWqs0tkcWGR2sh3GoEhVIcs1hvVYzhhVT24s9ImmqYWu5pF qqwD7SxZFADjsDgB84mwxyIEhWB7HUa5Ea9UxmEOnpdsq4v7SqSkEaPjWnB6Fc0lEAnI Aa4swdhZxXF1eIcfC/DQEx21eEeoSEzrWPKZv5PHSLVxM156yIOZs92BtKYsI5SzbPaL IIKxR2BvDDOJk7WEXw8R/wrMwfbDdypj2ZddLcqpPvckbTjpUGXx1KDWWsjB+morZ7rr Ai8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289243; x=1706894043; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3mHlKfb9Em9U1xMi4tLPjXlA5x9CMdBqSpo53CEwIhE=; b=h5+InGV8lPuQRDD6nxWrWypptSpYaWhpCdBIYJTHJx2UREfcW0lZI/zsornqB6ru8J IPfzLfgbHUdlUiJ94z5cjSQtYC3EUFbGOHO/NV9SfWPeassJsL++tjVhlREScaKveJpD KEEL9Pz0hD2O0I/8vIDM6ffmaOCm95KCEQGm6gFXpMFOE5aAn1gV4oE+JeyvQWoBkhRd uFaGoCct9ZHFAJp2P0tr+HPr1upTbgM7o/UgAthpyFUmWldcjdl5XEjWlE/ISv43l+R+ 73SF/6/V6MOpDm0sy4XOezABL+e+6gX7Ek1UK8jaRFgMO7OA8XeBsWbrcRVOxqgD2ujA bj5w== X-Gm-Message-State: AOJu0Yybnm1PJW9dbxjns+Ag1FNveZ6O1ifv3dKPNhj0lLFUevWIT2hS xSmYrgEYI3QBkfi073LXqPFklkdjrQN8nFLnbUKnuWEvtICq9grPHKm6A+It X-Google-Smtp-Source: AGHT+IGO+b/RYykNFQRQszC4R2f1Hc/rh4usoiPjBUKCDCbCC3w169Lg2zUcNsIRTRl46LccRCiUfg== X-Received: by 2002:a05:6214:1c09:b0:685:8ac0:c027 with SMTP id u9-20020a0562141c0900b006858ac0c027mr260095qvc.23.1706289243012; Fri, 26 Jan 2024 09:14:03 -0800 (PST) Received: from localhost.localdomain (dsl-153-164.b2b2c.ca. [66.158.153.164]) by smtp.gmail.com with ESMTPSA id ld8-20020a056214418800b006854ec9dbabsm668080qvb.92.2024.01.26.09.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:14:02 -0800 (PST) From: Maxim Cournoyer Date: Fri, 26 Jan 2024 12:13:18 -0500 Message-ID: <20240126171358.20291-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240126171358.20291-1-maxim.cournoyer@gmail.com> References: <20240126171358.20291-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * README.org (Running a local instance of mumi): New section. (Disabling browser caching): Likewise. --- (no changes since v1) README.org | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.org b/README.org index fd1d77b..d092de7 100644 --- a/README.org +++ b/README.org @@ -11,3 +11,27 @@ run #+BEGIN_SRC shell $ guix shell -D mumi #+END_SRC + +** Running a local instance of mumi + +First copy some test mail data to be indexed: + +#+begin_src shell + $ cp -a tests/data data +#+end_src + +Then, to have these emails indexed, run: + +#+begin_src shell + $ ./pre-inst-env mumi fetch +#+end_src + +You should now be able to visit http://0.0.0.0:1234 in your browser +and see your local mumi instance running. + +** Disabling browser caching + +If you modify the CSS or JavaScript source files, you'll want to make +sure your browser doesn't keep cached copies. This can be done by +changing a preference in the development tools menus, which is called +something like "Disable cache (while DevTools is active)". From patchwork Fri Jan 26 17:13:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 59439 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AB91827BBEA; Fri, 26 Jan 2024 17:15:38 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 41AA727BBE2 for ; Fri, 26 Jan 2024 17:15:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTPnA-0000fl-NH; Fri, 26 Jan 2024 12:15:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTPn6-0000ct-HN for guix-patches@gnu.org; Fri, 26 Jan 2024 12:14:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTPn6-0004oq-9H for guix-patches@gnu.org; Fri, 26 Jan 2024 12:14:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTPnC-0004Dd-Pm for guix-patches@gnu.org; Fri, 26 Jan 2024 12:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68680] [PATCH mumi v4 2/4] .gitignore: Register mumi.xapian and signing-key files. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Jan 2024 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68680@debbugs.gnu.org Cc: rekado@elephly.net, arunisaac@systemreboot.net, Maxim Cournoyer Received: via spool by 68680-submit@debbugs.gnu.org id=B68680.170628926316058 (code B ref 68680); Fri, 26 Jan 2024 17:15:02 +0000 Received: (at 68680) by debbugs.gnu.org; 26 Jan 2024 17:14:23 +0000 Received: from localhost ([127.0.0.1]:52589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTPmY-0004Ar-MT for submit@debbugs.gnu.org; Fri, 26 Jan 2024 12:14:23 -0500 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:47489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTPmS-00049s-QA for 68680@debbugs.gnu.org; Fri, 26 Jan 2024 12:14:17 -0500 Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-783cd245ec0so50286885a.3 for <68680@debbugs.gnu.org>; Fri, 26 Jan 2024 09:14:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706289244; x=1706894044; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ed+Jgz4fLmlIQRTpnaZXz2tCj6FJI7QVT+9VyLl1bUk=; b=dDNU/GmRE0lRyjsqA5qZ4qc+7l59s9KxCV/7JV3pZiiTnNB92eqzfx9V3Kre93KYn6 juP1UumAj5dIoF20brNZjVC1zKCJ30JtMMCdPIjDW7gCmiqubHbY3oSsdwZP1a/9ioaJ jUvOIpgGAYpc2Om0CqdH20mo9oCIV2CpDlWOmI7u2/sWHrrS7Z1ne82oJeHTo8d9OWQV Zw0rtn31HXMuMy4jV+EBIvrBloS9LGqKs4XNavA0qxRzZn/cBVnDW2o7dkM8VXuFHgPx s5F+tDg3JVUtaBBM6wksrJH8hNVYtJrYiIXoer4sVIVUMVxQUVgjmOQYYL+I41RtkayN cSdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289244; x=1706894044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ed+Jgz4fLmlIQRTpnaZXz2tCj6FJI7QVT+9VyLl1bUk=; b=Wnbj0pPA9d2vIgDF2VszP6xgcgdNQTmUuOrR2T1MbFRJQdhOYYaxW5nsKIjqr6e+sj rcUKSsljwuxijJC/FYSyrSc7SEzFNFJw4Ya88WGO5vFg1lHxUq5Jxc49p/KIBB6xh6eL YLgRhprPMH0o8bYlGr3d8YcDN2Ka4v5MfYAI6uIOusrjw+ZfN1RloIBncMUQrNn5dW2A NC2ibvHolf6mzf9hwys+LHc2qZ28gUqaIfmWdD2tdLYimIeeoJW7sOrQSuRpLkglFu6y UB2n5FKTQIMOifFuKe0tjELr8lexixe99SVI8w9lAkwztbiPkLoxixd93zAazQdyVUL/ dCdw== X-Gm-Message-State: AOJu0YxkDRYY2IlFeN17znXLhyIZzC4TbznFpF4gvdLkkkjlGtrWrjYk CNVnF0/QPmAWnCWq4rZYHFAbedVXa0VrkrT+JDOldFkYn+Uuopjfg3PK7eQd X-Google-Smtp-Source: AGHT+IG7iWrWQb4dUG+2/2r4aGIpaEz0JJ85450rBKDGmMu3xgxV/yBVbtln6Ld4jO5jwjjxPfYWYA== X-Received: by 2002:a05:6214:2526:b0:686:90f1:b17b with SMTP id gg6-20020a056214252600b0068690f1b17bmr176730qvb.40.1706289244320; Fri, 26 Jan 2024 09:14:04 -0800 (PST) Received: from localhost.localdomain (dsl-153-164.b2b2c.ca. [66.158.153.164]) by smtp.gmail.com with ESMTPSA id ld8-20020a056214418800b006854ec9dbabsm668080qvb.92.2024.01.26.09.14.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:14:03 -0800 (PST) From: Maxim Cournoyer Date: Fri, 26 Jan 2024 12:13:19 -0500 Message-ID: <20240126171358.20291-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240126171358.20291-1-maxim.cournoyer@gmail.com> References: <20240126171358.20291-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches --- (no changes since v1) .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2604e48..7247392 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,10 @@ config.log config.status configure +mumi.xapian mumi/config.scm scripts/mumi +signing-key pre-inst-env *.log *.trs From patchwork Fri Jan 26 17:13:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 59438 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C6F3827BBEE; Fri, 26 Jan 2024 17:15:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B17C427BBE2 for ; Fri, 26 Jan 2024 17:15:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTPnB-0000gr-SJ; Fri, 26 Jan 2024 12:15:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTPn7-0000cw-0k for guix-patches@gnu.org; Fri, 26 Jan 2024 12:14:57 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTPn6-0004oy-P0 for guix-patches@gnu.org; Fri, 26 Jan 2024 12:14:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTPnD-0004Dk-9y for guix-patches@gnu.org; Fri, 26 Jan 2024 12:15:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68680] [PATCH mumi v4 3/4] Add .patman configuration file. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Jan 2024 17:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68680@debbugs.gnu.org Cc: rekado@elephly.net, arunisaac@systemreboot.net, Maxim Cournoyer Received: via spool by 68680-submit@debbugs.gnu.org id=B68680.170628926316066 (code B ref 68680); Fri, 26 Jan 2024 17:15:03 +0000 Received: (at 68680) by debbugs.gnu.org; 26 Jan 2024 17:14:23 +0000 Received: from localhost ([127.0.0.1]:52591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTPmZ-0004Ay-4f for submit@debbugs.gnu.org; Fri, 26 Jan 2024 12:14:23 -0500 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:44271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTPmU-00049v-1G for 68680@debbugs.gnu.org; Fri, 26 Jan 2024 12:14:18 -0500 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-783b5aeaa63so56530685a.0 for <68680@debbugs.gnu.org>; Fri, 26 Jan 2024 09:14:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706289245; x=1706894045; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oXu1AYYpm6VjmbKL/ZWtoOydN4YLUsslEA8CdD/ouWY=; b=D9b5lU7n0j/YhGxdmonCL4+m82Nxl53Ucp/QM/5lutFUVmvCuIPobdpUJ9F6kvAWAC mhV/paSceOUN+EveU2n/1q5wgB8QBVusasnbYtjG13yHnL1xWK4j3K11FDP1uVa24Vd5 RvUajb0v3qU65x6bOtPvnyeaMmbCieolRIlyXTHYNiyHzRa87V7iU8c9UeFMSbac9DOa 7Lhtk3dfdLfl+I8OL3vIaAwwqAE8IK8yYeh4RRAa3endGu8M5dGGDchg55xB7pAT2D6D 2C+Qes5o1fCkSrI2ogrW3Dyxm351JXP1Q4lk4rgu0Tyxl9JsYQKSXtQDfEOoJbXyeJbD /H8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289245; x=1706894045; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oXu1AYYpm6VjmbKL/ZWtoOydN4YLUsslEA8CdD/ouWY=; b=RAmlmu34bdiEwgqNPkweLyF3H7no0MkuvnNhe/0zH9XBn3Trw2ymXxqgFNauvmaZ0D PGObpEz+kwrVJISckX3PVZvRV8euNW1qIaiWWV20CFiHKpf//OC/H9L1SyoRG1tqyXDw QEyWKXhWj3UX0Qy6rJts7rYgu3J6FbCO9TV5qaiTe2X4qBJ7Nubgo7xn4ueN6R/pmZHR PS+3enF9T/amb+b1yLQtdin5RiUh7GCfZJBI0W90aNDbSRfQkLBwZk9apv+Q7JUYSnU1 nJ/cHHXKzvwcWtpngMoY0CASzwAG6ooO9tojEe4LeY80JW9c6ZKzFYPw0AUh7VFFCKOP +Neg== X-Gm-Message-State: AOJu0YxxdQArxQxz94Bm/4ASthUmuM34ephQEgM7cfiVL2o4B2GuQmR+ mrHYMIoS27OIYHtDZvGSrJki6sSb8ETq0CqP73uNdUK6nJttUAYx6uGcs+We X-Google-Smtp-Source: AGHT+IE23Cp5aRZvxlN+nruDLHwnIE0g4rKbHAZAX419T+fPueNvqiYdpLXnDAXMrUNbHazX5qHyQQ== X-Received: by 2002:a05:6214:b69:b0:686:addf:511 with SMTP id ey9-20020a0562140b6900b00686addf0511mr179919qvb.100.1706289245417; Fri, 26 Jan 2024 09:14:05 -0800 (PST) Received: from localhost.localdomain (dsl-153-164.b2b2c.ca. [66.158.153.164]) by smtp.gmail.com with ESMTPSA id ld8-20020a056214418800b006854ec9dbabsm668080qvb.92.2024.01.26.09.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:14:05 -0800 (PST) From: Maxim Cournoyer Date: Fri, 26 Jan 2024 12:13:20 -0500 Message-ID: <20240126171358.20291-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240126171358.20291-1-maxim.cournoyer@gmail.com> References: <20240126171358.20291-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * .patman: New file. --- (no changes since v1) .patman | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .patman diff --git a/.patman b/.patman new file mode 100644 index 0000000..87b96e9 --- /dev/null +++ b/.patman @@ -0,0 +1,7 @@ +[settings] +project: guix-patches +patchwork_url: https://patches.guix-patches.cbaines.net +add_signoff: False +check_patch: False +ignore_bad_tags: True +keep_change_id: True From patchwork Fri Jan 26 17:13:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 59440 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5E58B27BBE2; Fri, 26 Jan 2024 17:15:30 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7811D27BBEC for ; Fri, 26 Jan 2024 17:15:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTPnO-0000hJ-Me; Fri, 26 Jan 2024 12:15:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTPn9-0000f3-4K for guix-patches@gnu.org; Fri, 26 Jan 2024 12:15:00 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTPn7-0004pC-AA for guix-patches@gnu.org; Fri, 26 Jan 2024 12:14:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTPnD-0004Dt-RY for guix-patches@gnu.org; Fri, 26 Jan 2024 12:15:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68680] [PATCH mumi v4 4/4] html: Add a button to copy a Message-ID to the clipboard. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Jan 2024 17:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68680@debbugs.gnu.org Cc: rekado@elephly.net, arunisaac@systemreboot.net, Maxim Cournoyer Received: via spool by 68680-submit@debbugs.gnu.org id=B68680.170628926416075 (code B ref 68680); Fri, 26 Jan 2024 17:15:03 +0000 Received: (at 68680) by debbugs.gnu.org; 26 Jan 2024 17:14:24 +0000 Received: from localhost ([127.0.0.1]:52593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTPmZ-0004B5-Cs for submit@debbugs.gnu.org; Fri, 26 Jan 2024 12:14:24 -0500 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:44208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTPmV-0004A0-Dk for 68680@debbugs.gnu.org; Fri, 26 Jan 2024 12:14:20 -0500 Received: by mail-qv1-xf2d.google.com with SMTP id 6a1803df08f44-68873473ce6so4959226d6.0 for <68680@debbugs.gnu.org>; Fri, 26 Jan 2024 09:14:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706289247; x=1706894047; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W/YpZzb/dSk4kYfH/BnjGk0FjB9KgtLTBvur+GKhuBo=; b=eXklrWJTrHg+m1YaUwhlJ/mt+WttzRRgpIMYdA8c2rL0ZVodcYNci12jXsbmY2c/WR ZpkFqjmb49Cq/Okl3hUthN2tf2TDeJZu3fJuvAZl8M9a2h5L6j355ZKWJ06jK38LM6cT vHCkU1Ghl51pzh1AoiPZtuUAFnr2UT9ZvrxizpRYZbqZwFUbLekS/PtkATPnJdhNhkD+ swBhi8BNhMMvBJMaonbACwKlrU857NwN1gRMa4r8voo/pDUxKNM8J1d5HrIHCr/H7quj AdBJkwcpgOxIplMHTfXrNodnR6VmfscrftqmZBgTaA2prqds5IX6vBs4j7q8FRks+QG4 oooQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289247; x=1706894047; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W/YpZzb/dSk4kYfH/BnjGk0FjB9KgtLTBvur+GKhuBo=; b=WFUiMXI2wJEqrfkx4TDlhd0xQGKw5vqq/66AWGbnKgw0V973vUcP6UQjYDgeBG14b4 tvRIASWK1QmlnUYhsAttIWZaXK5waTLnm05HMb9JjKsgAJfvuVHuwBg8tS2qtsgrMvRh 2GA52bYLaygAR1aKdCKh17dsxN9RNcO/md3tTGxCliOWWe+MYsQKTTvlS0A2ktBq8WyY cn6W5Ym0YVmyi5Ak7O0MnO6hUX0qww5QLRptzkyZ4E1OaG24gWHvX7bOH8MJMP09Vpt4 gVhRm7CxiuSX6KsWC2boF0+AvJ24x2hpcCa8+8hMFIgswri+N/K1DdBN14r/n4qvFCrU q+xg== X-Gm-Message-State: AOJu0YxuWi4zMLrRl9eVu/FsgeH80fVcIxr+IkWNuFH1ppFMfRnP10DY RlnnVOu4pVq5ErM3dHVea0aL5Gahtyfa71VMxW41jn1fli0VUiqBL59qlPNy X-Google-Smtp-Source: AGHT+IFoDKu/OM25MRsRcu7bZehtHxxE93AVEZ9eQVdsO+XBeaharKKdcM9I+38qx4unrpzfeuM0Sw== X-Received: by 2002:a05:6214:5188:b0:67c:cd09:9b93 with SMTP id kl8-20020a056214518800b0067ccd099b93mr140893qvb.7.1706289246835; Fri, 26 Jan 2024 09:14:06 -0800 (PST) Received: from localhost.localdomain (dsl-153-164.b2b2c.ca. [66.158.153.164]) by smtp.gmail.com with ESMTPSA id ld8-20020a056214418800b006854ec9dbabsm668080qvb.92.2024.01.26.09.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:14:06 -0800 (PST) From: Maxim Cournoyer Date: Fri, 26 Jan 2024 12:13:21 -0500 Message-ID: <20240126171358.20291-5-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240126171358.20291-1-maxim.cournoyer@gmail.com> References: <20240126171358.20291-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * mumi/web/view/html.scm (issue-page) : New HTML element. (layout): Bump timestamp on .css and .js files to force reload. * mumi/web/view/utils.scm (download-icon): Update source. Use 'rem' as size unit. (copy-icon): New variable. (display-message-body) : Add IDs to buttons. Add to "message-button" class. * assets/mumi.scss: Refactor spacing of message header buttons via a flex display. Add a shrinking animation to message buttons on hover. * assets/js/mumi.js (mumi): Register an event for it that copies the Message-ID to the clipboard. Add js-indent-level prop line as well as copyright notices. * mumi/web/view/html.scm --- Changes in v4: - Set icon sizes via CSS instead of HTML, which improves layout. Changes in v3: - Allow using the new copy button via the keyboard - Register event handlers on all copy message-id buttons - Move download icon sizes to CSS to resolve warning in Firefox - Add guard inside download button event to ensure only one event runs at a time, avoiding tooltip getting stuck on 'Copied!' - Use a class name instead of a unique ID for the message-id buttons - Register handlers to every message-id buttons Changes in v2: - Add timestamp to CSS and JavaScript file names to force reload assets/js/mumi.js | 59 ++++++++++++++++++++++++++++++++++++++++- assets/mumi.scss | 31 +++++++++++++++++++--- mumi/web/view/html.scm | 24 ++++++++++++----- mumi/web/view/utils.scm | 40 +++++++++++++++++----------- 4 files changed, 129 insertions(+), 25 deletions(-) diff --git a/assets/js/mumi.js b/assets/js/mumi.js index ab29f08..77b9276 100644 --- a/assets/js/mumi.js +++ b/assets/js/mumi.js @@ -1,4 +1,8 @@ -// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0-or-later +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0-or-later -*- js-indent-level: 2; -*- +// +// Copyright © 2019, 2022, 2023 Ricardo Wurmus +// Copyright © 2024 Maxim Cournoyer +// var mumi = (function () { const possibleTokens = [ { text: 'is:open' }, @@ -129,12 +133,65 @@ var mumi = (function () { var init = function () { initTokenInput (); }; + + // Copy a message Message-ID to the clipboard. + var setupMessageIdButtonHandler = () => { + + // Avoid having the async timeout code starting while a previous + // one is ongoing, which would corrupt the tooltip text. + var isMessageIdHandlerRunning = false; + + let messageIdHandler = (evt) => { + if (isMessageIdHandlerRunning) return; + isMessageIdHandlerRunning = true; + + // If the button was triggered by a keyup event, check if it was + // the Enter key. + if (evt.type === "keyup" && event.key !== "Enter") return; + + messageIdButton = evt.currentTarget; + originalTooltip = messageIdButton.dataset.tooltip; + var messageId = messageIdButton.dataset.messageId; + if (!window.isSecureContext) { + console.log("not in a secure context -- " + + "cannot copy message-id to clipboard\n" + + "tip: for testing, open via http://localhost:1234"); + return; + } + + // Avoid the button being stuck in the focused state when a + // mouse is used, to avoid UI clutter. + if (evt.type === "click") { + messageIdButton.removeAttribute('tabindex'); + } + + // Update button's tooltip for the next 3 s. + messageIdButton.dataset.tooltip = "Copied!"; + setTimeout(() => { + messageIdButton.dataset.tooltip = originalTooltip; + if (evt.type === "click") { + // Re-add the tabindex attribute. + messageIdButton.setAttribute("tabindex", "0") + isMessageIdHandlerRunning = false; + }}, 3000); + + navigator.clipboard.writeText(messageId); + console.log("copied Message-ID " + messageId + " to clipboard"); + }; + + document.querySelectorAll(".copy-message-id-button").forEach((btn) => { + btn.addEventListener("click", messageIdHandler); + btn.addEventListener("keyup", messageIdHandler)}); + }; + return({ 'init': init, 'lines': setupLineHandler, + 'messageIdButtonHandler': setupMessageIdButtonHandler, }); })(); window.addEventListener ("load", mumi.init); window.addEventListener ("DOMContentLoaded", mumi.lines); +window.addEventListener ("DOMContentLoaded", mumi.messageIdButtonHandler); // @license-end diff --git a/assets/mumi.scss b/assets/mumi.scss index 822f110..e605630 100644 --- a/assets/mumi.scss +++ b/assets/mumi.scss @@ -506,11 +506,36 @@ details { margin-right: 0.2em; } -.download-message, .download-part { float: right; - font-size: 0.8em; - font-style: italic; +} + +.header-buttons { + display: flex; + flex-direction: row; + float: right; + justify-content: flex-end; + } + +.header-buttons > * { + margin: 0 0 0 0.5rem; + // Custom buttons: undo the Pico CSS default style. We use + // buttons for inheriting their CSS style when focused via the + // keyboard. + background: revert; + border: revert; + color: revert; + padding: revert; +} + +.bi-copy, +.bi-download{ + height: 1rem; + width: 1rem; +} + +.message-button:hover { + transform: scale(0.95); } @media (min-width: 768px) { diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index 8f06a36..104162d 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -1,6 +1,7 @@ ;;; mumi -- Mediocre, uh, mail interface ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus ;;; Copyright © 2018, 2019, 2023 Arun Isaac +;;; Copyright © 2024 Maxim Cournoyer ;;; ;;; This program is free software: you can redistribute it and/or ;;; modify it under the terms of the GNU Affero General Public License @@ -62,11 +63,11 @@ (@ (rel "stylesheet") (media "screen") (type "text/css") - (href "/css/mumi.css?20221231000000"))) + (href "/css/mumi.css?20240126000000"))) (script (@ (src "/js/tokeninput.js"))) (script - (@ (src "/js/mumi.js"))) + (@ (src "/js/mumi.js?20240126000000"))) ,@head) (body (script (@ (src "/js/theme-switcher.js"))) @@ -612,6 +613,7 @@ currently disabled.")) (not (bug-archived bug))) mailer-form disabled-mailer))) + (define (show-message message-number message previous-subject) `((div (a (@ (class "message-anchor") @@ -642,10 +644,20 @@ currently disabled.")) message-number))) (title ,(date->string (date message)))) ,(time->string (date message))))) - (div (@ (class "download-message")) - (a (@ (href ,(format #f "/issue/~a/raw/~a" - id message-number))) - ,download-icon)) + (div (@ (class "header-buttons")) + (div (@ (class "copy-message-id-button message-button") + (tabindex "0") ;make it keyboard-usable + (role "button") ;specific to Pico CSS + (data-tooltip "Copy Message-ID") + (data-message-id ,(message-id message))) + ,copy-icon) + (div (@ (id "download-raw-message-button") + (class "message-button") + (role "button") + (data-tooltip "Download raw message")) + (a (@ (href ,(format #f "/issue/~a/raw/~a" + id message-number))) + ,download-icon))) ,@(if (string-suffix? previous-subject (subject message)) '() `((div (@ (class "subject")) ,(subject message)))) diff --git a/mumi/web/view/utils.scm b/mumi/web/view/utils.scm index 1ce7b64..712d198 100644 --- a/mumi/web/view/utils.scm +++ b/mumi/web/view/utils.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017, 2018, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2018 Ludovic Courtès +;;; Copyright © 2024 Maxim Cournoyer ;;; ;;; This program is free software: you can redistribute it and/or ;;; modify it under the terms of the GNU Affero General Public License @@ -35,6 +36,7 @@ #:use-module (web uri) #:export (prettify avatar-color + copy-icon download-icon display-message-body time->string)) @@ -215,23 +217,27 @@ numbers with the given MESSAGE-NUMBER." ;; https://icons.getbootstrap.com/icons/download/ (define download-icon '(svg (@ (class "bi bi-download") - (width "1em") - (height "1em") (viewBox "0 0 16 16") (fill "currentColor") (xmlns "http://www.w3.org/2000/svg")) - (title "Download") - (path (@ (fill-rule "evenodd") - (clip-rule "evenodd") - (d "M.5 8a.5.5 0 01.5.5V12a1 1 0 001 1h12a1 1 0 001-1\ -V8.5a.5.5 0 011 0V12a2 2 0 01-2 2H2a2 2 0 01-2-2V8.5A.5.5 0 01.5 8z")) "") - (path (@ (fill-rule "evenodd") - (clip-rule "evenodd") - (d "M5 7.5a.5.5 0 01.707 0L8 9.793 10.293 7.5a.5.5 0 \ -11.707.707l-2.646 2.647a.5.5 0 01-.708 0L5 8.207A.5.5 0 015 7.5z")) "") + (path (@ (d "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 \ +1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 \ +1-2-2v-2.5a.5.5 0 0 1 .5-.5"))) + (path (@ (d "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 \ +0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 \ +1 0-.708.708z"))))) + +;; https://icons.getbootstrap.com/icons/copy/ +(define copy-icon + '(svg (@ (class "bi bi-copy") + (viewBox "0 0 16 16") + (fill "currentColor") + (xmlns "http://www.w3.org/2000/svg")) (path (@ (fill-rule "evenodd") - (clip-rule "evenodd") - (d "M8 1a.5.5 0 01.5.5v8a.5.5 0 01-1 0v-8A.5.5 0 018 1z")) ""))) + (d "M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 \ +2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 \ +0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 \ +2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"))))) (define* (display-message-body bug-num message-number message #:optional plain?) "Convenience procedure to render MESSAGE (part of bug with number @@ -285,7 +291,9 @@ lines when PLAIN? is #T." ""))) ((string-suffix? ".scm" attachment-name) `(div (@ (class "multipart scheme")) - (div (@ (class "download-part")) + (div (@ (id "download-scheme-part-button") + (class "download-part message-button") + (data-tooltip "Download Scheme file")) (a (@ (href ,(attachment-url))) ,download-icon)) ,(highlights->sxml (highlight lex-scheme body)))) @@ -294,7 +302,9 @@ lines when PLAIN? is #T." (list "multipart" (or (and content-type (content-type->css-class content-type)) ""))))) - (div (@ (class "download-part")) + (div (@ (id "download-part-button") + (class "download-part message-button") + (data-tooltip "Download MIME part")) (a (@ (href ,(attachment-url))) ,download-icon)) ,(cond