[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question about links, macros + org-publish and "parametrization"
From: |
Ihor Radchenko |
Subject: |
Re: question about links, macros + org-publish and "parametrization" |
Date: |
Wed, 29 May 2024 13:35:17 +0000 |
Martin Steffen <msteffen@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>
- question about links, macros + org-publish and "parametrization", Martin Steffen, 2024/05/28
- Re: question about links, macros + org-publish and "parametrization", Fraga, Eric, 2024/05/29
- Re: question about links, macros + org-publish and "parametrization", Martin Steffen, 2024/05/29
- Re: question about links, macros + org-publish and "parametrization", Martin Steffen, 2024/05/30
- Re: question about links, macros + org-publish and "parametrization", Fraga, Eric, 2024/05/30
- Re: question about links, macros + org-publish and "parametrization", Martin Steffen, 2024/05/30
- Re: question about links, macros + org-publish and "parametrization", Max Nikulin, 2024/05/30
- Re: question about links, macros + org-publish and "parametrization", Ihor Radchenko, 2024/05/30
- Re: question about links, macros + org-publish and "parametrization", Max Nikulin, 2024/05/31
Re: question about links, macros + org-publish and "parametrization",
Ihor Radchenko <=