all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* New section to easily reference Debbugs URLs within Emacs Debbugs
@ 2023-09-17 20:51 Maxim Cournoyer
  2023-09-18 16:07 ` Notmuch, Debbugs: my helpers (was Re: New section to easily reference Debbugs URLs within Emacs Debbugs) Simon Tournier
  2023-09-25 21:27 ` New section to easily reference Debbugs URLs within Emacs Debbugs Mekeor Melire
  0 siblings, 2 replies; 10+ messages in thread
From: Maxim Cournoyer @ 2023-09-17 20:51 UTC (permalink / raw)
  To: guix-devel

Hello,

If you use Emacs and Emacs-Debbugs, you may be interested in applying
the settings newly documented in the 'Viewing Bugs within Emacs' section
of the manual; see it at the bottom of info "(guix) The Perfect Setup").

I hope that's useful,

-- 
Thanks,
Maxim


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Notmuch, Debbugs: my helpers (was Re: New section to easily reference Debbugs URLs within Emacs Debbugs)
  2023-09-17 20:51 New section to easily reference Debbugs URLs within Emacs Debbugs Maxim Cournoyer
@ 2023-09-18 16:07 ` Simon Tournier
  2023-09-20 18:13   ` Maxim Cournoyer
  2023-09-25 21:27 ` New section to easily reference Debbugs URLs within Emacs Debbugs Mekeor Melire
  1 sibling, 1 reply; 10+ messages in thread
From: Simon Tournier @ 2023-09-18 16:07 UTC (permalink / raw)
  To: Maxim Cournoyer, guix-devel

Hi,

On Sun, 17 Sep 2023 at 16:51, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> If you use Emacs and Emacs-Debbugs, you may be interested in applying
> the settings newly documented in the 'Viewing Bugs within Emacs' section
> of the manual; see it at the bottom of info "(guix) The Perfect Setup").

Oh, cool!

On Saturday, I discovered ’honey-apple’ on IRC and today I was planning
to improve my setup.  Perfect timing! :-)

BTW, let me share some of my helpers.  They are quite simple but it
helps me.  Maybe it could be useful to others.  Well, I read my emails
using Emacs-Notmuch but I guess this should be adaptable for Gnus or
mu4e.

Since I often lag behind, I often have patches in my inbox where I have
been CC.  I try to keep focused on by an easy triage, so I quickly want
to know if this patch is still open or if it is already marked as done.
Before opening, or while reading, I just press ’C’ and it queries
Debbugs (SOAP) and displays the current status.

Similarly, sometimes old but still open bug pops up.  It is a reply or
just a ping and because it is old, I do not necessary have the context.
I just press ’b’ and it opens Emacs-Debbugs for the issue at hand.  If
there is many messages (that I do not have locally) and say it will need
some time to read them, and say I am often reading offline, well I just
press ’I’ and it downloads all the thread and injects it in my Guix
email folder (and also indexed by notmuch :-)).

Last, when reading from Debbugs, I press ’R’ for replying.  I like to
have https://issues.guix.gnu.org/issue/NNNNN at hand so pressing ’R’
stashes this URL specific to the issue and ready to be pasted.

Below the config. :-)

--8<---------------cut here---------------start------------->8---
  (defun my/notmuch-show-get-debbugs ()
    "Extract Debbugs number.

From an email message, it exracts the number NNNN as in
NNNN@debbugs.gnu.org from the fields From/To/CC and it returns a
list of integers.

If in `notmuch-search-mode', then the returns is nil, so let try
to extract from the email subject assuming the pattern bug#NNNN."
    (let* ((all-mails (seq-reduce
                       (lambda (r f)
                         (let ((s (funcall f)))
                           (if s
                               (append r (split-string s "," t))
                             r)))
                       (list 'notmuch-show-get-from
                             'notmuch-show-get-to
                             'notmuch-show-get-cc)
                       nil))
           (debbugs (seq-filter
                     (lambda (x) (string-match-p (regexp-quote "@debbugs.gnu.org") x))
                     all-mails))
           (numbers (remq nil
                          (mapcar
                           (lambda (x)
                             (let ((n (when (string-match "\\([0-9]+\\)@debbugs.gnu.org" x)
                                        (match-string 1 x)))
                                   (d (when (string-match "\\([0-9]+\\)-done@debbugs.gnu.org" x)
                                        (match-string 1 x)))
                                   (c (when (string-match "\\([0-9]+\\)-close@debbugs.gnu.org" x)
                                        (match-string 1 x)))
                                   )
                               (or n d c)))
                           debbugs))))
      (or
       (mapcar 'string-to-number numbers)
       ;; Let extract from the subject
       (let* ((subject (notmuch-search-find-subject))
              (n (when (and subject
                            (string-match ".*bug#\\([0-9]+\\).*" subject))
                   (match-string 1 subject))))
         (when n
           (list (string-to-number n))))))))

  (defun my/notmuch-debbugs-check ()
    "Send request to Debbugs instance about pending status and report."
    (interactive)
    (let* ((number (car (my/notmuch-show-get-debbugs)))
           (meta (if number
                     (car (debbugs-get-status number))
                   (user-error "Notmuch: no @debbugs.gnu.org")))
           (status (debbugs-get-attribute meta 'pending))
           (listify #'(lambda (bug attr)
                      (let ((some (debbugs-get-attribute bug attr)))
                        (if (listp some)
                            some
                          (list some)))))
           (infos (or (sort (append
                             (funcall listify meta 'tags)
                             (funcall listify meta 'severity))
                            'string<)
                      "")))
      (message "Status bug#%d: %s %s" number status infos)))

  (define-key notmuch-tree-mode-map (kbd "C")
    'my/notmuch-debbugs-check)
  (define-key notmuch-search-mode-map (kbd "C")
    'my/notmuch-debbugs-check)
  (define-key notmuch-show-mode-map (kbd "C")
    #'(lambda ()
        ;; XXXX: For some reason, without wrapping with
        ;;     (lambda () (interactive) ...)
        ;; it returns: Wrong type argument: commandp
        (interactive)
        (my/notmuch-debbugs-check))

  (defun my/notmuch-debbugs-open ()
    "Open the current message with Debbugs mode."
    (interactive)
    (let ((numbers (my/notmuch-show-get-debbugs)))
      (if numbers
          (apply 'debbugs-gnu-bugs numbers)
        (user-error "Notmuch: no @debbugs.gnu.org"))))

  (define-key notmuch-tree-mode-map (kbd "b") ;rebind `notmuch-show-resend-message'
    'my/notmuch-debbugs-open)
  (define-key notmuch-search-mode-map (kbd "b") ;rebind `notmuch-show-resend-message'
    'my/notmuch-debbugs-open)
  (define-key notmuch-show-mode-map (kbd "b") ;rebind `notmuch-show-resend-message'
    'my/notmuch-debbugs-open)

  (define-key gnus-summary-mode-map "I" ;rebind `gnus-summary-increase-score'
    #'(lambda ()
        "Import thread to Notmuch."
        (interactive)
        ;; XXXX: Is `debbugs-get-status' using caching?
        (let* ((meta  (car (debbugs-get-status debbugs-gnu-bug-number)))
               (inbox (car (debbugs-get-attribute meta 'package))) ;match with `piem-inboxes'
               (raw   (debbugs-get-attribute meta 'msgid))
               (msgid (replace-regexp-in-string "<\\|>" "" raw)))
          (piem-inject-thread-into-maildir msgid inbox)
          (notmuch-command-to-string "new" "--no-hooks")
          (notmuch-tag (concat "id:" msgid) (list "+Later"))
          (message "Imported %s from %s using %s." debbugs-gnu-bug-number inbox msgid))))

  (define-key gnus-article-mode-map "R"
    #'(lambda ()
        "Start composing a reply mail to the current message.
The original article will be yanked, see `gnus-summary-wide-reply-with-original'."
        (interactive)
        (let* ((all-mails (seq-reduce
                           (lambda (r f)
                             (let ((s (funcall 'message-fetch-field f)))
                               (if s
                                   (append r (split-string s "," t))
                                 r)))
                           (list "from"
                                 "to"
                                 "cc")
                           nil))
               (debbugs (seq-filter
                         (lambda (x) (string-match-p (regexp-quote "@debbugs.gnu.org") x))
                         all-mails))
               (numbers (remq nil
                              (mapcar
                               (lambda (x)
                                 (let ((n (when (string-match "\\([0-9]+\\)@debbugs.gnu.org" x)
                                            (match-string 1 x)))
                                       (d (when (string-match "\\([0-9]+\\)-done@debbugs.gnu.org" x)
                                            (match-string 1 x))))
                                   (if n n d)))
                               debbugs)))
               (number (if numbers
                           (progn
                             (unless (= 1 (length numbers))
                               (user-error "Bang! Not a Debbugs message"))
                             (when (> 1 (length numbers))
                               (message "Consider only %s" (car numbers)))
                             (car numbers))
                         ""))
               (url (concat "https://issues.guix.gnu.org/issue/" number)))
          (kill-new url)
          (gnus-summary-wide-reply-with-original nil)
          (message "Stashed: %s" url))))
--8<---------------cut here---------------end--------------->8---


Cheers,
simon


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Notmuch, Debbugs: my helpers (was Re: New section to easily reference Debbugs URLs within Emacs Debbugs)
  2023-09-18 16:07 ` Notmuch, Debbugs: my helpers (was Re: New section to easily reference Debbugs URLs within Emacs Debbugs) Simon Tournier
@ 2023-09-20 18:13   ` Maxim Cournoyer
  2023-09-21  7:58     ` Helpers? " Simon Tournier
  0 siblings, 1 reply; 10+ messages in thread
From: Maxim Cournoyer @ 2023-09-20 18:13 UTC (permalink / raw)
  To: Simon Tournier; +Cc: guix-devel

Hi Simon,

Simon Tournier <zimon.toutoune@gmail.com> writes:

> Hi,
>
> On Sun, 17 Sep 2023 at 16:51, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>
>> If you use Emacs and Emacs-Debbugs, you may be interested in applying
>> the settings newly documented in the 'Viewing Bugs within Emacs' section
>> of the manual; see it at the bottom of info "(guix) The Perfect Setup").
>
> Oh, cool!
>
> On Saturday, I discovered ’honey-apple’ on IRC and today I was planning
> to improve my setup.  Perfect timing! :-)
>
> BTW, let me share some of my helpers.  They are quite simple but it
> helps me.  Maybe it could be useful to others.  Well, I read my emails
> using Emacs-Notmuch but I guess this should be adaptable for Gnus or
> mu4e.
>
> Since I often lag behind, I often have patches in my inbox where I have
> been CC.  I try to keep focused on by an easy triage, so I quickly want
> to know if this patch is still open or if it is already marked as done.
> Before opening, or while reading, I just press ’C’ and it queries
> Debbugs (SOAP) and displays the current status.
>
> Similarly, sometimes old but still open bug pops up.  It is a reply or
> just a ping and because it is old, I do not necessary have the context.
> I just press ’b’ and it opens Emacs-Debbugs for the issue at hand.  If
> there is many messages (that I do not have locally) and say it will need
> some time to read them, and say I am often reading offline, well I just
> press ’I’ and it downloads all the thread and injects it in my Guix
> email folder (and also indexed by notmuch :-)).

Cool, thanks for sharing!  I don't use Notmuch but I'm sure they'll come
in help to someone!

[...]

>
>   (define-key gnus-article-mode-map "R"
>     #'(lambda ()
>         "Start composing a reply mail to the current message.
> The original article will be yanked, see `gnus-summary-wide-reply-with-original'."

This comes stock with Gnus (used by Emacs-Debbugs); I just enter 'S W'
(capitalized S followed by capitalized W) to send a wide reply (wide
replies to keep the bug in CC as well as all participants subscribed).
To reply privately to a single participant you could use just the 'R'
Gnus binding.

-- 
Thanks,
Maxim


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Helpers? (was Re: New section to easily reference Debbugs URLs within Emacs Debbugs)
  2023-09-20 18:13   ` Maxim Cournoyer
@ 2023-09-21  7:58     ` Simon Tournier
  0 siblings, 0 replies; 10+ messages in thread
From: Simon Tournier @ 2023-09-21  7:58 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: guix-devel

Hi Maxim,

On Wed, 20 Sep 2023 at 14:13, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

>>   (define-key gnus-article-mode-map "R"
>>     #'(lambda ()
>>         "Start composing a reply mail to the current message.
>> The original article will be yanked, see `gnus-summary-wide-reply-with-original'."
>
> This comes stock with Gnus (used by Emacs-Debbugs); I just enter 'S W'
> (capitalized S followed by capitalized W) to send a wide reply (wide
> replies to keep the bug in CC as well as all participants subscribed).
> To reply privately to a single participant you could use just the 'R'
> Gnus binding.

Yeah, I rebind ’S W’ to ’R’ and drop the private reply to a single
participant that I never use.  That’s to be uniform with Emacs-Notmuch
and ’R’ fits better my muscle memory for wide reply.  Anyway.

The interesting part here is the stash part, I guess.  Maybe an advice
around gnus-summary-wide-reply-with-original would be better.

When I start the wide reply, it extracts the Debbugs-ID number (e.g.,
12345) and push "https://issues.guix.gnu.org/issue/12345" to the kill
ring.  Then I can easily yank it somewhere in the message for
reference.

Well, it is an helper when doing some triage of old bugs.   For example,
it eases to type this:

--8<---------------cut here---------------start------------->8---
Hi,

This bug#30434 [1] is old… blabla…

1: https://issues.guix.gnu.org/issue/30434
--8<---------------cut here---------------end--------------->8---

Similarly, I have another helper that I have often used from Debbugs
(gnus) Summary.

--8<---------------cut here---------------start------------->8---
(defmacro defun-bug->url (name url &optional docstring)
  "Macro returning yankage #bug URL.

The `interactive' function that the macro returns is then referred by NAME.

Please provide a DOCSTRING."
  (let ((fun (intern (symbol-name name)))
        (doc (concat docstring "\n\n"
                           (format "Yankable result: `%sNUMBER'." url))))
    `(defun ,fun (number)
       ,doc
        (interactive
         (list
          (progn
            (when (not (boundp 'debbugs-gnu-bug-number))
              (setq debbugs-gnu-bug-number -2))
            (read-string
             (format "Bug number (%s): " debbugs-gnu-bug-number)
             nil nil debbugs-gnu-bug-number))))
      (let ((str (format "%s%s" ,url number)))
        (kill-new str)
        (when current-prefix-arg
          (browse-url str))
        (message (format "%s killed." str))))))

(defun-bug->url my/guix-issues "https://issues.guix.gnu.org/issue/"
          "Add URL of bug NUMBER to `kill-ring'.")
(defun-bug->url my/guix-debbugs "https://debbugs.gnu.org/cgi/bugreport.cgi?bug="
          "Add (old) URL of bug NUMBER to `kill-ring'.")
--8<---------------cut here---------------end--------------->8---

Well, I remember Ludo also shared [1] some of their helper.  And Joshua
Branson worked [2] about some guix-debbugs.el.  Maybe it would be worth
to collect these various simple helpers and put them in the Cookbook or
else.  Because, Debbugs has many annoyances but one best advantage is
just being email, and as Chris Wellons said:

        I’m now understanding for the first time why all those old fogey
        hackers like to use e-mail for everything: mailing lists,
        software patches, bug reporting, etc. E-mail a user interface
        agnostic system, giving everyone their own choice. The tricky
        part is setting up a decent interface to it.

        https://nullprogram.com/blog/2013/09/03/

Cheers,
simon


1: Re: debbugs-guix.el helper function
Ludovic Courtès <ludo@gnu.org>
Fri, 07 Oct 2022 11:47:38 +0200
id:87ilkwc6dh.fsf@gnu.org
https://lists.gnu.org/archive/html/guix-devel/2022-10
https://yhetil.org/guix/87ilkwc6dh.fsf@gnu.org

2: https://issues.guix.gnu.org/issue/56987


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New section to easily reference Debbugs URLs within Emacs Debbugs
  2023-09-17 20:51 New section to easily reference Debbugs URLs within Emacs Debbugs Maxim Cournoyer
  2023-09-18 16:07 ` Notmuch, Debbugs: my helpers (was Re: New section to easily reference Debbugs URLs within Emacs Debbugs) Simon Tournier
@ 2023-09-25 21:27 ` Mekeor Melire
  2023-09-25 21:53   ` Mekeor Melire
  1 sibling, 1 reply; 10+ messages in thread
From: Mekeor Melire @ 2023-09-25 21:27 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

2023-09-17 16:51 maxim.cournoyer@gmail.com:

> Hello,

Hello Maxim,

> If you use Emacs and Emacs-Debbugs, you may be interested in 
> applying the settings newly documented in the 'Viewing Bugs 
> within Emacs' section of the manual; see it at the bottom of 
> info "(guix) The Perfect Setup").
>
> I hope that's useful,

Thank you for sharing. The new section is very useful for me. I 
have two things to feed back though.


First feedback: I think the new section should instruct to set the `bug-reference-url-format'. I.e. we should add this to the 
suggested code snippet: (setq bug-reference-url-format 
"https://issues.guix.gnu.org/%s"). Otherwise, the suggested code 
snippet results in an error when a bug reference is clicked. See 
appendix.


Second feedback: It might be nice to write regular-expressions using the `rx' macro, but imho writing them as strings is shorter, unobtrusive and thus preferable for average Guix users. I.e. I'd suggest to replace the two setq-expressions of code that the new manual section suggests, with the following S-expressions respectively:

(setq bug-reference-bug-regexp "\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch 
?#\\|[Ff]ixes:? ?#\\|RFE ?#\\|PR 
[+a-z-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\|<https://bugs\\.gnu\\.org/\\(?2:[0-9]+\\)>\\)")

(setq debbugs-browse-url-regexp 
"^https?://\\(?:bugs\\|debbugs\\|issues\\.guix\\)\\.gnu\\.org/+\\(\\(?:cgi/bugreport\\.cgi\\?bug=\\)?\\)\\(?3:[[:digit:]]+\\)$")


WDYT?



[-- Attachment #2: reproduce-error.el --]
[-- Type: application/emacs-lisp, Size: 2138 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New section to easily reference Debbugs URLs within Emacs Debbugs
  2023-09-25 21:27 ` New section to easily reference Debbugs URLs within Emacs Debbugs Mekeor Melire
@ 2023-09-25 21:53   ` Mekeor Melire
  2023-09-26  8:27     ` Mekeor Melire
  0 siblings, 1 reply; 10+ messages in thread
From: Mekeor Melire @ 2023-09-25 21:53 UTC (permalink / raw)
  To: guix-devel; +Cc: Maxim Cournoyer

[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]

2023-09-25 21:27 mekeor@posteo.de:

> 2023-09-17 16:51 maxim.cournoyer@gmail.com:
>
> > Hello,
>
> Hello Maxim,
>
> > If you use Emacs and Emacs-Debbugs, you may be interested in
> > applying the settings newly documented in the 'Viewing Bugs 
> > within
> > Emacs' section of the manual; see it at the bottom of info 
> > "(guix)
> > The Perfect Setup").
> >
> > I hope that's useful,
>
> Thank you for sharing. The new section is very useful for me. I 
> have
> two things to feed back though.
>
>
> First feedback: I think the new section should instruct to set 
> the
> `bug-reference-url-format'. I.e. we should add this to the 
> suggested
> code snippet: (setq bug-reference-url-format
> "https://issues.guix.gnu.org/%s"). Otherwise, the suggested code
> snippet results in an error when a bug reference is clicked. See
> appendix.
>
>
> Second feedback: It might be nice to write regular-expressions 
> using
> the `rx' macro, but imho writing them as strings is shorter,
> unobtrusive and thus preferable for average Guix users. I.e. I'd
> suggest to replace the two setq-expressions of code that the new
> manual section suggests, with the following S-expressions
> respectively:
>
> (setq bug-reference-bug-regexp "\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch
> ?#\\|[Ff]ixes:? ?#\\|RFE ?#\\|PR
> [+a-z-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\|<https://bugs\\.gnu\\.org/\\(?2:[0-9]+\\)>\\)")
>
> (setq debbugs-browse-url-regexp
> "^https?://\\(?:bugs\\|debbugs\\|issues\\.guix\\)\\.gnu\\.org/+\\(\\(?:cgi/bugreport\\.cgi\\?bug=\\)?\\)\\(?3:[[:digit:]]+\\)$")
>
>
> WDYT?
>
>
> [2. application/emacs-lisp; reproduce-error.el]...

Third thought: Use #' for quoting functions consistently. Maybe do 
some code alignment.

Putting all three thoughts together, I'd gather this code suggestion:


[-- Attachment #2: new.el --]
[-- Type: application/emacs-lisp, Size: 859 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New section to easily reference Debbugs URLs within Emacs Debbugs
  2023-09-25 21:53   ` Mekeor Melire
@ 2023-09-26  8:27     ` Mekeor Melire
  2023-10-04 20:39       ` Mekeor Melire
  0 siblings, 1 reply; 10+ messages in thread
From: Mekeor Melire @ 2023-09-26  8:27 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: guix-devel, Maxim Cournoyer

2023-09-25 21:53 mekeor@posteo.de:

> Putting all three thoughts together, I'd gather this code 
> suggestion:
>
> [2. application/emacs-lisp; new.el]...

Sorry, it seems I forgot to apply my first thought in the appended 
file... (setq bug-reference-url-format 
"https://issues.guix.gnu.org/%s"). Sorry for the noise.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New section to easily reference Debbugs URLs within Emacs Debbugs
  2023-09-26  8:27     ` Mekeor Melire
@ 2023-10-04 20:39       ` Mekeor Melire
  2023-10-05 17:19         ` Maxim Cournoyer
  2023-10-18 15:32         ` Brian Cully via Development of GNU Guix and the GNU System distribution.
  0 siblings, 2 replies; 10+ messages in thread
From: Mekeor Melire @ 2023-10-04 20:39 UTC (permalink / raw)
  To: Maxim Cournoyer, guix-devel

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

Thanks, Maxim, for implementing some of my suggestions in commit 
06dc36ffb7cde821a4762b299d1c95b3788ba110, as I coincidentally 
found out when reading the commit log.

By the way, I still believe it's less off-putting for average people to see 
two lines of regular expressions instead of 28 lines of symbolic 
expressions.

I'd now like to make another suggestion, appended as patch, that allows for URLs like https://issues.guix.gnu.org/12345 to be opened in debbugs-mode within Emacs.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-Update-bug-reference-configuration-snippet.patch --]
[-- Type: text/x-patch, Size: 1764 bytes --]

From c7531be0ef70e7b872ffe1f759ded05d3819f863 Mon Sep 17 00:00:00 2001
Message-ID: <c7531be0ef70e7b872ffe1f759ded05d3819f863.1696452375.git.mekeor@posteo.de>
From: Mekeor Melire <mekeor@posteo.de>
Date: Wed, 4 Oct 2023 22:31:31 +0200
Subject: [PATCH] doc: Update bug-reference configuration snippet.

* doc/contributing.texi (The Perfect Setup)
<Viewing Bugs within Emacs>: Make bug-reference-bug-regexp match
URLs based on issues.guix.gnu.org.
---
 doc/contributing.texi | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/contributing.texi b/doc/contributing.texi
index 0de47a403b..d32d8baf53 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -427,9 +427,13 @@ The Perfect Setup
                                  (zero-or-one
                                   (seq "#" (one-or-more
                                             (char "0-9"))))))
-                     (seq "<https://bugs.gnu.org/"
+                     (seq (? "<") "https://bugs.gnu.org/"
                           (group-n 2 (one-or-more (char "0-9")))
-                          ">")))))
+                          (? ">"))
+                     (seq (? "<") "https://issues.guix.gnu.org/"
+                          (? "issue/")
+                          (group-n 2 (one-or-more (char "0-9")))
+                          (? ">"))))))
 (setq bug-reference-url-format "https://issues.guix.gnu.org/%s")
 
 (require 'debbugs)

base-commit: 0a1af11ff82254b369fa3ac8a9af2d97bb877ed0
prerequisite-patch-id: 5c2772bc2c8e5d80d5bbe55f6d301484e5976243
prerequisite-patch-id: 8bbff2e38835dfc1230b6bd67b342e6137e85f9e
prerequisite-patch-id: 158f8f743ea550ad35ec410cea3ed8fd7b3bc1f5
prerequisite-patch-id: f053f68a1b77d4246cf0f0ae42644f9c51a809a3
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: New section to easily reference Debbugs URLs within Emacs Debbugs
  2023-10-04 20:39       ` Mekeor Melire
@ 2023-10-05 17:19         ` Maxim Cournoyer
  2023-10-18 15:32         ` Brian Cully via Development of GNU Guix and the GNU System distribution.
  1 sibling, 0 replies; 10+ messages in thread
From: Maxim Cournoyer @ 2023-10-05 17:19 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: guix-devel, Simon Tournier

Hi,

Mekeor Melire <mekeor@posteo.de> writes:

> Thanks, Maxim, for implementing some of my suggestions in commit
> 06dc36ffb7cde821a4762b299d1c95b3788ba110, as I coincidentally found
> out when reading the commit log.
>
> By the way, I still believe it's less off-putting for average people
> to see two lines of regular expressions instead of 28 lines of
> symbolic expressions.
>
> I'd now like to make another suggestion, appended as patch, that
> allows for URLs like https://issues.guix.gnu.org/12345 to be opened in
> debbugs-mode within Emacs.

I think you meant "https://issues.guix.gnu.org/issue/12345" instead,
right? Otherwise, it already works that way.  This was brought up by
Simon.  I had argued that we should perhaps just not use that variant of
/issue/ in the URL, but maybe there's a good reason to have it?

Anyway, I won't loose sleep on it.  Applied :-).

-- 
Thanks,
Maxim


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New section to easily reference Debbugs URLs within Emacs Debbugs
  2023-10-04 20:39       ` Mekeor Melire
  2023-10-05 17:19         ` Maxim Cournoyer
@ 2023-10-18 15:32         ` Brian Cully via Development of GNU Guix and the GNU System distribution.
  1 sibling, 0 replies; 10+ messages in thread
From: Brian Cully via Development of GNU Guix and the GNU System distribution. @ 2023-10-18 15:32 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: Maxim Cournoyer, guix-devel

Mekeor Melire <mekeor@posteo.de> writes:

> By the way, I still believe it's less off-putting for average people
> to see two lines of regular expressions instead of 28 lines of
> symbolic expressions.

The original patch did use standard regexp notation, and I adjusted it
to the ‘rx’ version. While, in general, I prefer terse code over the
verbose, I felt this was a good change because the first principle in
software freedom is the ability for others to understand and modify
code. Regexp notation is famously complex and hard to read and
understand. I, myself, have been using it extensively for decades, and I
still had to carefully study the previous regexp in order to translate
it.

So, in my opinion, while the ‘rx’ macro is substantially longer, it
provides a much greater ability to be understood and modified, and that
is more important than copying fewer characters.

-bjc


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-10-18 15:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-17 20:51 New section to easily reference Debbugs URLs within Emacs Debbugs Maxim Cournoyer
2023-09-18 16:07 ` Notmuch, Debbugs: my helpers (was Re: New section to easily reference Debbugs URLs within Emacs Debbugs) Simon Tournier
2023-09-20 18:13   ` Maxim Cournoyer
2023-09-21  7:58     ` Helpers? " Simon Tournier
2023-09-25 21:27 ` New section to easily reference Debbugs URLs within Emacs Debbugs Mekeor Melire
2023-09-25 21:53   ` Mekeor Melire
2023-09-26  8:27     ` Mekeor Melire
2023-10-04 20:39       ` Mekeor Melire
2023-10-05 17:19         ` Maxim Cournoyer
2023-10-18 15:32         ` Brian Cully via Development of GNU Guix and the GNU System distribution.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.