guix-devel
[Top][All Lists]
Advanced

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

Re: debbugs-guix.el helper function


From: Ludovic Courtès
Subject: Re: debbugs-guix.el helper function
Date: Fri, 07 Oct 2022 11:47:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

zimoun <zimon.toutoune@gmail.com> skribis:

> In the same spirit, I have:

[...]

> (defun-bug->url my/guix-issues "http://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'.")

I have something similar that I find extremely useful: hitting C-w on a
bug adds the mumi and debbugs URLs to the kill ring.

--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---

Ludo’.



reply via email to

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