all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Generate BEGIN_EXAMPLE block dynamically during export
Date: Tue, 16 Feb 2016 18:10:11 -0500	[thread overview]
Message-ID: <CAFyQvY2J-qtRg62-OdZa6jhvxT-be2PDnseqgBxMjt_hMmnDdQ@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY3gGgt7-AYJPFt=S=A-nuNZoh_-pJZ1MbuuyX91GuOP2A@mail.gmail.com>

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

This seems to work from my brief testing:

#+AUTHOR:
#+OPTIONS: toc:nil
#+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz" :exports none

#+NAME: tar-eg
#+BEGIN_SRC emacs-lisp
  (let ((contents (format "> tar xzvf %s" tar-file)))
    (with-temp-buffer
      (insert contents)
      (write-file "results.txt"))
    contents)
#+END_SRC

#+CALL: tar-eg() :wrap example :exports results

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

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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 19:10 Generate BEGIN_EXAMPLE block dynamically during export Kaushal Modi
2016-02-16 20:02 ` 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 [this message]

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

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

  git send-email \
    --in-reply-to=CAFyQvY2J-qtRg62-OdZa6jhvxT-be2PDnseqgBxMjt_hMmnDdQ@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.