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 17:20:31 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e016348a8ff1341052bea8c48 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVnzd-0001IF-2X for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 17:21:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVnzc-0006xA-3V for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 17:21:12 -0500 Received: from mail-io0-x22c.google.com ([2607:f8b0:4001:c06::22c]:35713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVnzb-0006wh-Ux for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 17:21:12 -0500 Received: by mail-io0-x22c.google.com with SMTP id g203so3354812iof.2 for ; Tue, 16 Feb 2016 14:21:11 -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 --089e016348a8ff1341052bea8c48 Content-Type: text/plain; charset=UTF-8 I finally have this working! #+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz" :exports none :file "results.txt" #+NAME: tar-eg #+BEGIN_SRC emacs-lisp (format "> tar xzvf %s" tar-file) #+END_SRC #+CALL: tar-eg() :wrap example :exports none #+CAPTION: =results.txt= #+NAME: code__results #+INCLUDE: "results.txt" :src text I need to export to a separate file and also embed the results in the exported document. So above is what I came up with. --089e016348a8ff1341052bea8c48 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I finally have this working!

#+PROPERTY: header-args:emacs-lisp :var tar-file=3D"= ;bar.tar.gz" :exports none :file "results.txt"

#+NAME: tar-eg
#+BEGIN_SRC emacs-lisp
(format "> tar xzvf %s" tar-file)
#+END_SRC

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

#+CAPTION: =3Dresul= ts.txt=3D
#+NAME: code__results
#+INCLUDE: "results.txt" :src text

I need to export to a separate file and also embed the resu= lts in the exported document. So above is what I came up with.
<= /div> --089e016348a8ff1341052bea8c48--