reza <r...@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>