guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs and URLs in Git commit messages


From: Ludovic Courtès
Subject: Re: Emacs and URLs in Git commit messages
Date: Fri, 05 Feb 2021 11:40:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi,

Chris Marusich <cmmarusich@gmail.com> skribis:

> Many Guix commits look like this:
>
>   commit f9978346e73359ac1d8b88c9ed874edc7225582b
>   Author: Ludovic Courtès <ludo@gnu.org>
>   Date:   Fri Dec 18 18:10:04 2020 +0100
>
>       avahi: Remove poll timeout when possible.
>
>       Fixes <https://issues.guix.gnu.org/45314>.
>
>       * guix/avahi.scm (avahi-browse-service-thread): Change timeout default 
> value
>       to false when no "stop-loop?" procedure is passed. Adapt 
> "iterate-simple-poll"
>       call accordingly.
>
>       Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
>
> Regarding the URL, do people just type it all out, including the opening
> and closing brackets (<>)?  Or is there an Emacs command that does it
> for you?  I've briefly looked on the Internet, but this is the kind of
> thing that seems difficult to search for.

I have this helper for debbugs.el:

--8<---------------cut here---------------start------------->8---
(defun ludo-copy-debbugs-url ()
  "Add to the kill ring the URL of the Debbugs issue at point."
  (interactive)
  (let ((url1 (concat "https://bugs.gnu.org/";
                      (number-to-string (debbugs-gnu-current-id))))
        (url2 (concat "https://issues.guix.gnu.org/";
                      (number-to-string (debbugs-gnu-current-id)))))
    (kill-new url1)
    (kill-new url2)
    (message "Copied %s and %s" url1 url2)))

(define-key debbugs-gnu-mode-map (kbd "C-w") 'ludo-copy-debbugs-url)
--8<---------------cut here---------------end--------------->8---

That way I can C-w on a bug in *Guix Bugs* and I get the two URLs in the
clipboard (I normally use “bugs.gnu.org” as the canonical bug URL.)

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]