Martin Steffen <mstef...@ifi.uio.no> writes: > The way I make that smooth is I define > > #LINK: exercises-web https://www.gitpages.io/somelecture/fall23/exercises > > ... > So I am happy with that, but I wonder if I could make it even more > parametrized. Like > > > combining macros with links > > > like that "fall23" is an argument to a macros, which then builds up a > link. But that does not to work in a naive way, like > > > #+MACRO: semester fall24 > #+LINK: https://www.gitpages.io/somelecture/{{{semester}}}/exercises > ... > where semester is a macro, not a literal "fall24". The second reason is > that the use as in (*) is not really useful, what I am really after is > something like > > [[parametricexercizes(fall24)][the exercises are here]]
The simplest thing you can use is #+LINK: exercises-web https://www.gitpages.io/somelecture/%s/exercises [[exercises-web:fall24][the exercises are here]] If you need something more complex, check out %(my-function) placeholder instead of %s as described in "Link Abbreviations" section of Org manual. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>