Re: [O] Generate BEGIN_EXAMPLE block dynamically during export
From:
Kaushal Modi
Subject:
Re: [O] Generate BEGIN_EXAMPLE block dynamically during export
Date:
Tue, 16 Feb 2016 15:51:06 -0500
Thanks Tom.
Your solution almost gets me there but I still need to manually update the tar-file argument value in the #+CALL lines.
What I am looking for is for something like below to work (but it isn't). I have multiple such #+CALL lines and I would like to not manually update the tar-file arg in all those.
Below does not work because the {{{TAR_FILE}}} macro does not get expanded in the #+CALL line.
#+MACRO: TAR_FILE some_file.tar.gz
#+NAME: tar-eg
#+HEADER: :var tar-file="" :exports none
#+BEGIN_SRC emacs-lisp
(format "> tar xzvf %s" tar-file)
#+END_SRC
#+CALL: tar-eg(tar-file="{{{TAR_FILE}}}") :wrap example :exports results