Here’s my take to link to JIRA items easily from #orgmode.
First, register your instance as a link type:
(add-to-list 'org-link-abbrev-alist ("JIRA" . "https://jira.example.com/browse/"))
So [[JIRA:PROJ-1234][PROJ-1234]] links to your JIRA instance. But it’s still some typing, even worse, with the org-insert-link
command you need to enter the ticket number twice.
Tempel to the rescue. This template prompts for the ticket once (or uses the region if you marked a ticket number) and creates an org link:
org-mode
(jira "[[JIRA:" (r "Ticket: " ticket t) ticket "][" ticket "]]")
Obviously, you can repurpose this to any link type / search engine.
Note I’m using the NOINSERT
flag for the (r …) form, so the ticket is queried from the minibuffer instead of inline typing. Otherwise, a bug in the org-element cache is triggered if Tempel inserts the ticket number in multiple places at the same time.
#emacs