3

I have lots of links that look like:

https://domain.com/en/res/main/r1/sm-e/spec/1/1#q=1-1-1

I want to be able to enter a string like:

A-1-1

and be able to create a correct link like:

[[https://domain.com/en/res/main/r1/sm-e/spec/1/1#q=1-1-1][A-1-1]]

In the past, I was able to find help for links to pdf documents. But this is more complex, but I would love to hear your suggestions.

Can I have a bonus answer?

How do I pass multiple parameters to my abbreviations? Can the following be a clue? where I can find examples?

(org-link-set-parameter "type" :complete #'some-completion-function)
1
  • 1
    C-h i g (org)Link Abbreviations RET should help.
    – NickD
    Feb 14, 2021 at 17:22

1 Answer 1

4

tl;dr:

#+LINK: jira  https://jira.mycompany.com/browse/%s
[[jira:TASK-1234][TASK-1234: label]] 

will create the links you desire.

As NickD mentions, find "Link Abbreviations" in the org manual., also via C-h i g (org)Link Abbreviations <RET>

2
  • The first step is done. Now, how do I translate ticket1234 into TASK-1234? Feb 14, 2021 at 18:16
  • Something link M-x query-replace-regexp <RET> \(ticket\([0-9]+\)\) <RET> [[jira:TASK-\2]] <RET> should work.
    – jsled
    Feb 17, 2021 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.