From patchwork Tue Sep 12 03:44:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 53746 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 99DC627BBEA; Tue, 12 Sep 2023 04:45:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, 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 2503527BBE2 for ; Tue, 12 Sep 2023 04:45:10 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfuKh-0001zf-MY; Mon, 11 Sep 2023 23:44:59 -0400 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 1qfuKh-0001zX-2W for guix-patches@gnu.org; Mon, 11 Sep 2023 23:44:59 -0400 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 1qfuKg-0001Vs-Po; Mon, 11 Sep 2023 23:44:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfuKl-0005zJ-4V; Mon, 11 Sep 2023 23:45:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65883] [PATCH] .dir-locals.el: Update bug-reference configuration and document it. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Tue, 12 Sep 2023 03:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65883 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65883@debbugs.gnu.org, maxim.cournoyer@gmail.com Cc: ludo@gnu.org X-Debbugs-Original-To: guix-patches@gnu.org, maxim.cournoyer@gmail.com X-Debbugs-Original-Xcc: ludo@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169449029922987 (code B ref -1); Tue, 12 Sep 2023 03:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Sep 2023 03:44:59 +0000 Received: from localhost ([127.0.0.1]:55594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfuKg-0005yf-7G for submit@debbugs.gnu.org; Mon, 11 Sep 2023 23:44:58 -0400 Received: from lists.gnu.org ([2001:470:142::17]:36682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfuKb-0005yN-Nr for submit@debbugs.gnu.org; Mon, 11 Sep 2023 23:44:56 -0400 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 1qfuKR-0001px-NZ for guix-patches@gnu.org; Mon, 11 Sep 2023 23:44:43 -0400 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfuKO-0001Su-SL for guix-patches@gnu.org; Mon, 11 Sep 2023 23:44:43 -0400 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-64c2e2572f7so32291586d6.1 for ; Mon, 11 Sep 2023 20:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694490279; x=1695095079; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Gv+Ev/2PRhDNFG+2fM3DPuLpCLxc642MK8/PqE/8BbQ=; b=hpAooXSifU0/HpE2bxfLA2juTtrPDemWJqPNVZu5YCbrh6Behz+tVmx/3Nsub3Kio3 sxjQOj0ggxMIzSBFyP6lXnqgDX5BKk9TXO5oiMK8C0ec3/dlRjJLxtaCK/zuCZ0MEGnn xqFJVPqcMgw107Hn10tXE0czpR5KJRcTwG+OZAhzfE19uKnWfYvRHVIZeEmt2mo26UWz FjTOGYT4iQyUftir3yX7lczv1BP+HSnCfPyHA2nFntIkQyEIyQnuE4Tu6jz1xpN07jbb rpm28MdaTtcHVe4Lr4E2oOCWd4liXK0DAn+qH7Wl+uZ7TCUU3Z+sXhZzHkUa1POxhuDB CbSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694490279; x=1695095079; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Gv+Ev/2PRhDNFG+2fM3DPuLpCLxc642MK8/PqE/8BbQ=; b=hqD2c1vLxRyGBccQey5cHmR3NqUMcUQne2LjEQfnkrCFJPGXLVujRBiARE4tJPHnEu AM6dEuJ4XYuCMQp+YgW5qnAFJXsEMY1yDrOPm8eqL7ARo94PSIH1BgoUzDQNYU1W24w3 aS/P8b+tVMgvqg68FhZV0cwFCLdxvjo7F5mmJfkxFXJafiigRGTKJ8e2kkC6HXIe9Pv/ 17gs1lcBEOP5xGCYHM7KVN09hcPb+xY/3ScE+saS97Vz18egmTTNPUsJDpQWdOZj7fMK zmQSepR/SoK0YV4d3syzBhA2PXF8IAwp9MtyLZoUmN4o6Ls8N5EeyZRhh6Yjv0xY6su4 ncMg== X-Gm-Message-State: AOJu0YywIAhEiArbVgTlQE/5Q8768vaHleeFwiMYtJMlpb2v0J1T++jM 2xoFduwsVQ1f3QuzgUNxj40eKD927+g= X-Google-Smtp-Source: AGHT+IHwL8dlzVasFL3gG06HlSR1drbos/HOV8fzvacHsexjPDGlOkXp74UYs8yRKVgs3ovwKlZ34g== X-Received: by 2002:a0c:b38a:0:b0:651:65f4:31fa with SMTP id t10-20020a0cb38a000000b0065165f431famr10744180qve.39.1694490279384; Mon, 11 Sep 2023 20:44:39 -0700 (PDT) Received: from localhost.localdomain (dsl-141-150.b2b2c.ca. [66.158.141.150]) by smtp.gmail.com with ESMTPSA id cx19-20020a05620a51d300b0076f12fcb0easm2968338qkb.2.2023.09.11.20.44.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 20:44:38 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 11 Sep 2023 23:44:31 -0400 Message-ID: <0f74c4468dae139ae2406b8200d0ba6bdc374455.1694490271.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 (nil) : Update URL. Add comment. * doc/contributing.texi (The Perfect Setup): New "Viewing bugs within Emacs" subsection. --- .dir-locals.el | 6 ++++-- doc/contributing.texi | 45 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) base-commit: 2a7f031ca9d6d16fe0264023d8beca02b3ac0050 diff --git a/.dir-locals.el b/.dir-locals.el index 36714c1aa4..c63262848c 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -5,10 +5,12 @@ (tab-width . 8) (sentence-end-double-space . t) - ;; For use with 'bug-reference-prog-mode'. + ;; For use with 'bug-reference-prog-mode'. Extra bug-reference + ;; configuration should be done in your Emacs user configuration file; + ;; refer to (info (guix) The Perfect Setup). (bug-reference-bug-regexp . "\\(\\)") - (bug-reference-url-format . "https://bugs.gnu.org/%s") + (bug-reference-url-format . "https://issues.guix.gnu.org/%s") (eval . (add-to-list 'completion-ignored-extensions ".go")) diff --git a/doc/contributing.texi b/doc/contributing.texi index a0da871f1a..608da89a2c 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -379,6 +379,51 @@ The Perfect Setup save then add @code{(add-hook 'after-save-hook 'copyright-update)} in Emacs. +@subsection Viewing Bugs within Emacs + +Emacs has a nice minor mode called @code{bug-reference}, which, when +combined with @samp{emacs-debbugs} (the Emacs package), can be used to +open links such as @samp{} or +@samp{} as bug report buffers. From +there you can easily consult the email thread via the Gnus interface, +reply or modify the bug status, all without leaving the comfort of +Emacs! Below is a sample configuration to add to your @file{~/.emacs} +configuration file: + +@lisp +;;; Bug references. +(add-hook 'prog-mode-hook #'bug-reference-prog-mode) +(add-hook 'gnus-mode-hook #'bug-reference-mode) +(add-hook 'erc-mode-hook #'bug-reference-mode) +(add-hook 'bug-reference-mode-hook 'debbugs-browse-mode) +(add-hook 'bug-reference-prog-mode-hook 'debbugs-browse-mode) +(add-hook 'gnus-summary-mode-hook 'bug-reference-mode) +(add-hook 'gnus-article-mode-hook 'bug-reference-mode) + +;;; This extends the default expression (the first complicated blob) to also +;;; match URLs such as or +;;; . It is also extended to detect "Fixes: +;;; #NNNNN" git trailers. +(setq bug-reference-bug-regexp + (concat + "\\(" + "\\(?:\\b\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|[Ff]ixes:? ?#\\|\ +RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)" + "\\|" + "\\(?:\\)" + "\\)")) +(setq bug-reference-url-format "https://bugs.gnu.org/%s") +;; The following allows Emacs Debbugs user to open the issue directly within +;; Emacs. +(setq debbugs-browse-url-regexp + "^https?://\\(debbugs\\|\\(issues\\.guix\\|bugs\\)\\)\\.gnu\\.org/\ +\\(cgi/bugreport\\.cgi\\?bug=\\)?\\(?3:[[:digit:]]+\\)$") +@end lisp + +For more information, refer to @ref{Bug Reference,,, emacs, The GNU +Emacs Manual} and @ref{Minor Mode,,, debbugs-ug, The Debbugs User +Guide}. + @node Packaging Guidelines @section Packaging Guidelines