Jump to issue tracker from revision buffer

25 views
Skip to first unread message

Martin Geisler

unread,
Sep 14, 2017, 4:21:07 AM9/14/17
to Magit Maling list
Hi all,

I notice that Magit highlights parts in brackets when showing commit messages. I typically use that for issue numbers, such as [FOO-123]. Would it be possible to have that be a link to the actual issue tracker? Something so that I can press RET when point is in the text and then have the browser open the relevant page.

I vaguely remember to have seem something about kind of functionality in the manual, but I wasn't able to find anything while searching for it now.

--

Kyle Meyer

unread,
Sep 14, 2017, 10:04:36 AM9/14/17
to Martin Geisler, Magit Maling list
Martin Geisler <mar...@geisler.net> writes:
>
> I notice that Magit highlights parts in brackets when showing commit
> messages. I typically use that for issue numbers, such as [FOO-123]. Would
> it be possible to have that be a link to the actual issue tracker?
> Something so that I can press RET when point is in the text and then have
> the browser open the relevant page.
>
> I vaguely remember to have seem something about kind of functionality in
> the manual, but I wasn't able to find anything while searching for it now.

You can get that by setting bug-reference-bug-regexp and
bug-reference-url-format. For an example, have a look at .dir-locals.el
in the Magit repo.

Your magit-revision-mode-hook should already include bug-reference-mode.
To follow the link, you can call bug-reference-push-button (C-c RET).

--
Kyle

Martin Geisler

unread,
Sep 18, 2017, 6:46:13 AM9/18/17
to Kyle Meyer, Magit Maling list
Awesome, thanks a lot! I was searching for things like "magit click issue number" and it did not occur to me to call this a "bug reference" :-)
Reply all
Reply to author
Forward
0 new messages