|
From: | Olaf.Hamann |
Subject: | Re: [O] var expansion on tangling only once per file |
Date: | Thu, 12 Apr 2012 13:18:04 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 5.0; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 |
Am 12.04.2012 09:41, schrieb Rainer M Krug:
On 11/04/12 16:15, Eric Schulte wrote:Would it be possible to simply only declare the variable in a header argument applying to the first code block? Using a session would keep that variables state through all subsequent code blocks.Would work - but as I said above, I would have preferred to have the variable defined at the top of the buffer. I could use though the no-expand header argument for the source blocks. At the moment,
What about : #+NAME var-as-literal-block #+BEGIN_EXAMPLE 99 #+END_EXAMPLE #+begin_src ... :var TheVar=var-as-literal-block ...using TheVar in code #+end_src ---------------------------- I would prefer using Macros in this case : #+MACRO: TheVar 99 #+begin_src ... :var TheVar={{{TheVar}}} ...using TheVar in code #+end_src But looks like that macros do not expand in src_block header arguments. Regards, Olaf
[Prev in Thread] | Current Thread | [Next in Thread] |