all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Helpers? (was Re: New section to easily reference Debbugs URLs within Emacs Debbugs)
Date: Thu, 21 Sep 2023 09:58:40 +0200	[thread overview]
Message-ID: <865y44rm8f.fsf@gmail.com> (raw)
In-Reply-To: <877cok4ssy.fsf@gmail.com>

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


  reply	other threads:[~2023-09-21  8:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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     ` Simon Tournier [this message]
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.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=865y44rm8f.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.