monotux.tech

bug-reference-mode

Emacs

I try to keep a journal at work for meeting notes, support tickets and whatever I’m working on. In most cases it looks like this:

* TODO Do this thing ##123456
Something something. Due date yesterday.

The ##123456 refers to a support ticket in our internal issue tracker. It quickly gets old to manually copy the ticket number, open a browser, go to the issue tracker, wait for it to load, paste the ticket number and then, finally see the ticket.

So I used the built-in bug-reference-mode to make this more convenient. Fix the regexp and adapt to your workflow!

(use-package bug-reference
  :config (defun monotux/bug-reference-mode-settings ()
            (setq bug-reference-bug-regexp "\\(##\\)\\([0-9]\\{6\\}\\)"
                  bug-reference-url-format "https://internal.address.tld/pathToResource=%s"))
  (add-hook 'bug-reference-mode-hook #'monotux/bug-reference-mode-settings))

I enable it with an org-mode-hook. Now all strings that matches the patterns becomes hyperlinks that takes me straight to the support ticket.

Compared to my previous efforts to “save time” by automating boring things, this saves me as much as 30 seconds per use as our ticket system is quite slow.