emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Generate BEGIN_EXAMPLE block dynamically during export
Date: Tue, 16 Feb 2016 14:10:06 -0500	[thread overview]
Message-ID: <CAFyQvY1mekN5Vkbo=XQUyWK=6CTVugjxLWX-N2PHXgfSepTa7w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 702 bytes --]

             reply	other threads:[~2016-02-16 19:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 19:10 Kaushal Modi [this message]
2016-02-16 20:02 ` Generate BEGIN_EXAMPLE block dynamically during export Thomas S. Dye
2016-02-16 20:51   ` Kaushal Modi
2016-02-16 21:03     ` Thomas S. Dye
2016-02-16 21:16       ` Kaushal Modi
2016-02-16 21:47         ` Kaushal Modi
2016-02-16 22:18           ` Thomas S. Dye
2016-02-16 22:20             ` Kaushal Modi
2016-02-16 22:28           ` Nick Dokos
2016-02-16 22:40             ` Kaushal Modi
2016-02-16 23:10               ` Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY1mekN5Vkbo=XQUyWK=6CTVugjxLWX-N2PHXgfSepTa7w@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).