From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Generate BEGIN_EXAMPLE block dynamically during export Date: Tue, 16 Feb 2016 14:10:06 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013a04a809a8ac052be7e4c9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVl1M-0007VS-Ov for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 14:10:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVl1L-00029P-ND for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 14:10:48 -0500 Received: from mail-ob0-x22e.google.com ([2607:f8b0:4003:c01::22e]:34654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVl1L-000299-Bh for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 14:10:47 -0500 Received: by mail-ob0-x22e.google.com with SMTP id wb13so274719536obb.1 for ; Tue, 16 Feb 2016 11:10:47 -0800 (PST) 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: emacs-org list --089e013a04a809a8ac052be7e4c9 Content-Type: text/plain; charset=UTF-8 Hi all, I'd like to have an EXAMPLE block in my org file whose value is set using something like an org macro at the time of export. So, something like: #+MACRO TAR_FILE some_file.tar.gz #+BEGIN_EXAMPLE > tar xvzf {{{TAR_FILE}}} #+END_EXAMPLE As the above is not possible, what would be a good way to generate the EXAMPLE block on the fly during export with the value of {{{TAR_FILE}}} replaced based on the macro definition? -- Kaushal Modi --089e013a04a809a8ac052be7e4c9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I'd like to have an EXAMPLE= block in my org file whose value is set using something like an org macro = at the time of export.

So, something like:

#+MACRO TAR_FILE some_file.tar.gz

#+BEGIN_EXAMPLE
> tar xvzf {{{TAR_FILE}}}
#+E= ND_EXAMPLE

As the above is not possible, what woul= d be a good way to generate the EXAMPLE block on the fly during export with= the value of {{{TAR_FILE}}} replaced based on the macro definition?
<= div>

--
Kaushal Modi<= /div>
--089e013a04a809a8ac052be7e4c9--