[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs and URLs in Git commit messages
From: |
Chris Marusich |
Subject: |
Re: Emacs and URLs in Git commit messages |
Date: |
Fri, 05 Feb 2021 21:00:32 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi,
Thank you for the replies!
Maxime Devos <maximedevos@telenet.be> writes:
> I don't known any emacs command for that, but you inspired me to write
> such a command myself: [1].
>
> Maxime.
> [1]:
> https://notabug.org/mdevos/things/commit/b0400ba06b6f031e88f1f89b47079c3c6d7dcac4
zimoun <zimon.toutoune@gmail.com> writes:
> I am not representative since I commit few fixes. Well, I have a tiny
> helper that pushes to the kill ring:
>
> <https://github.com/zimoun/my-conf/blob/master/.config/emacs/lisp/funs.el#L271>
>
> Especially reading bug#45314 in Debbugs mode, I type “M-x
> my/guix-issues” then the URL ’http://issues.guix.gnu.org/issue/45314’ is
> stashed. If not in debbugs mode, as here in message mode, the tiny
> helper asks the bug number then pushes it to the kill ring. This tiny
> helper is far from perfect, any improvements is welcome. :-) Especially
> if it is already provided by an Emacs command.
>
> About the brackets, I type them.
Ludovic Courtès <ludo@gnu.org> writes:
> I have this helper for debbugs.el:
>
> (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)
>
> 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’.
OK, I see. So I'm not missing out on some built-in Emacs (or
debbugs-emacs) magic; most people just put together something convenient
on their own. That makes sense! Thank you for the examples; it's
helpful to see how others are doing it. I think I'll try something
similar.
Bengt Richter <bokr@bokr.com> writes:
> I am not sure I understand your context or goal in searching ;/
I'm always interested in finding more effective ways to get things done.
Sometimes, asking people how they do something is the best way to
discover new methods, even if the answer seems simple or obvious.
--
Chris
signature.asc
Description: PGP signature