Re: Expand macros in links

2022-12-27 Thread Ihor Radchenko
Michael Dauer writes: > Agree. How do you run such feature polls? Change subject to something like [FR] [POLL] Allow expanding macros in link path like [[https://site-{{{macro}}}.com]] Then see how many people reply. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Or

Re: Expand macros in links

2022-12-27 Thread Michael Dauer
Agree. How do you run such feature polls? Ihor Radchenko schrieb am Di., 27. Dez. 2022, 17:20: > Michael Dauer writes: > > > I'm aware of this theoretical conflict. But I see the risk as very low > > compared to the value of not having to make a lot of customizations for > > export and internal

Re: Expand macros in links

2022-12-27 Thread Ihor Radchenko
Michael Dauer writes: > I'm aware of this theoretical conflict. But I see the risk as very low > compared to the value of not having to make a lot of customizations for > export and internal link handling. It should just work out of the box. Even low risk does not justify impossible-to-use links

Re: Expand macros in links

2022-12-27 Thread Michael Dauer
I'm aware of this theoretical conflict. But I see the risk as very low compared to the value of not having to make a lot of customizations for export and internal link handling. It should just work out of the box. If you deem necessary there would still be the possibility to define a global switch

Re: Expand macros in links

2022-12-27 Thread Ihor Radchenko
Michael Dauer writes: > I mean something like: > * Heading > [[http:abc{{{input-file}}}] > > When exporting it to html then the link is not replaced. This is to be expected, and I do think that Org is doing it right by not replacing macros in links. You cannot exactly control what is inside lin

Re: Expand macros in links

2022-12-27 Thread Michael Dauer
I mean something like: * Heading [[http:abc{{{input-file}}}] When exporting it to html then the link is not replaced. I'm talking about expansion when exporting. But I also implemented macro expansion for following links within emacs quite a while ago. Different story but also very powerful espe

Re: Expand macros in links

2022-12-27 Thread Ihor Radchenko
Michael Dauer writes: > I do not understand why links are excluded from macro expansion. I would > see it as very valuable to have macros for links too. Are they? Could you please provide an example? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at

Expand macros in links

2022-12-27 Thread Michael Dauer
Hi, I do not understand why links are excluded from macro expansion. I would see it as very valuable to have macros for links too. The change would be as simple as inserting (eq type 'link) into org-macro-replace-all. May I recommend this patch. Thanks, Michael