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