emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot expand macros through included org file


From: Ihor Radchenko
Subject: Re: Cannot expand macros through included org file
Date: Wed, 15 Feb 2023 21:10:26 +0000

reza <reza@housseini.me> writes:

>> What you can do instead is creating a named Org paragraph with macro,
>> like
>> 
>> #+name: year
>> {{{year}}}
>
> I tried this approach but it does not seem to work either:

It works, but Org does not include variable assignments to exported code
by default. See org-babel-exp-code-template. The assignment would be
done if you execute the blocks though.

Note that year will have a value of "2019\n" with trailing newline.
Yet another approach is including common :var year=2009 header arg.

-- 
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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]