unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Emacs and URLs in Git commit messages
Date: Fri, 05 Feb 2021 11:40:32 +0100	[thread overview]
Message-ID: <87y2g24x27.fsf@gnu.org> (raw)
In-Reply-To: <87o8h0mdmt.fsf@gmail.com> (Chris Marusich's message of "Thu, 04 Feb 2021 00:38:18 -0800")

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


  parent reply	other threads:[~2021-02-05 10:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  8:38 Emacs and URLs in Git commit messages Chris Marusich
2021-02-04  9:15 ` Maxime Devos
2021-02-06  5:00   ` Chris Marusich
2021-02-04 13:16 ` zimoun
2021-02-04 19:12 ` Bengt Richter
2021-02-05 10:40 ` Ludovic Courtès [this message]
2021-04-21  3:09   ` Maxim Cournoyer
2021-05-07  9:20     ` Alexey Abramov

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87y2g24x27.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).