From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Generate BEGIN_EXAMPLE block dynamically during export Date: Tue, 16 Feb 2016 15:51:06 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e011762d1322ca4052be94db0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVmb6-0005l2-0M for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 15:51:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVmb5-0002sX-1m for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 15:51:47 -0500 Received: from mail-io0-x22c.google.com ([2607:f8b0:4001:c06::22c]:33148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVmb4-0002sJ-RX for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 15:51:46 -0500 Received: by mail-io0-x22c.google.com with SMTP id z135so138796739iof.0 for ; Tue, 16 Feb 2016 12:51:46 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: emacs-org list --089e011762d1322ca4052be94db0 Content-Type: text/plain; charset=UTF-8 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 --089e011762d1322ca4052be94db0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Tom.

Your solution almost gets= me there but I still need to manually update the tar-file argument value i= n the #+CALL lines.

What I am looking for is for something like below to work (bu= t 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 expan= ded in the #+CALL line.

#+MACRO: TAR_FILE some_file.ta= r.gz

#= +NAME: tar-eg
#+HEADER: :var tar-file=3D&qu= ot;" :exports none
#+BEGIN_SRC emacs-l= isp
(format "> tar xzvf %s" ta= r-file)
#+END_SRC

#+CALL: tar-eg(tar-file=3D"= ;{{{TAR_FILE}}}") :wrap example :exports results

<= /div>
--089e011762d1322ca4052be94db0--