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 16:16:18 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2b0ea5583f5052be9a754 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVmzT-00041m-RX for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 16:17:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVmzT-0007o7-0b for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 16:16:59 -0500 Received: from mail-io0-x229.google.com ([2607:f8b0:4001:c06::229]:33459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVmzS-0007nh-RO for emacs-orgmode@gnu.org; Tue, 16 Feb 2016 16:16:58 -0500 Received: by mail-io0-x229.google.com with SMTP id z135so140313695iof.0 for ; Tue, 16 Feb 2016 13:16:58 -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 --001a11c2b0ea5583f5052be9a754 Content-Type: text/plain; charset=UTF-8 That works perfectly! Thank you! Just to add that I had to have "#+HEADER: :exports none" as I did not want the elisp code to be visible in the exported documents. #+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz" #+NAME: tar-eg #+HEADER: :exports none #+BEGIN_SRC emacs-lisp (format "> tar xzvf %s" tar-file) #+END_SRC #+CALL: tar-eg() :wrap example :exports results --001a11c2b0ea5583f5052be9a754 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
That works perfectly! Thank you= !

Just= to add that I had to have "#+HEADER: :exports none" as I did not= want the elisp code to be visible in the exported documents.

#+PROPERTY: header-args:emacs-lisp :var tar-file=3D"bar.tar.gz= "

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

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