From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Tangling src blocks to files as part of export Date: Fri, 14 Nov 2014 09:39:19 +0100 Message-ID: References: <3B947464-9723-45DA-9EB4-D84633366471@gmail.com> <871A2C12-586B-4E42-AEE9-31BFAA4C8EBF@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpCPj-0007hc-N5 for emacs-orgmode@gnu.org; Fri, 14 Nov 2014 03:39:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpCPc-0007Pa-V2 for emacs-orgmode@gnu.org; Fri, 14 Nov 2014 03:39:31 -0500 Received: from mail-wg0-f46.google.com ([74.125.82.46]:60742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpCPc-0007PR-On for emacs-orgmode@gnu.org; Fri, 14 Nov 2014 03:39:24 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so18930750wgg.33 for ; Fri, 14 Nov 2014 00:39:23 -0800 (PST) In-Reply-To: <871A2C12-586B-4E42-AEE9-31BFAA4C8EBF@gmail.com> (Michael Weylandt's message of "Thu, 13 Nov 2014 11:15:34 -0500") 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: Michael Weylandt Cc: "emacs-orgmode@gnu.org" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Michael Weylandt writes: >> On Nov 13, 2014, at 10:54 AM, Michael Weylandt wrote: >>=20 >> Is it possible to have certain blocks tangled as part of export so >> that they are available as input files to later source blocks? >>=20 >> E.g., >>=20 >> #+BEGIN_SRC python :tangle hello.py >> print "Hello World" >> #+END_SRC >>=20 >> #+BEGIN_SRC sh >> python hello.py >> #+END_SRC >>=20 >> If I tangle before running, then the second code block will work; else, = it fails because 'hello.py' is not found. [1] >>=20 >> I can run tangle and export in a row (and I have my own function to >> do just that) but is there a native org way to do so? > > Adding org-babel-tangle to the org-export-before-processing-hook does > the job, but I'd still be interested in knowing if there's a more > official method. I think this is the more-or-less official way of doing it - that's what hooks are for: to do pre- and post-processing, which is exactly what you want to do. I like it actually. Do you set the hook as a file local variable, and if yes, how? Because this would be brilliant. Cheers, Rainer > > =2D-=20 Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJUZb+7AAoJENvXNx4PUvmC8AcH/1bFMkktEyn+busnqQtzwwiY 3nuOvOqtWN9HER/an6szQb2s6nrq6UuaimHEwRPl8O2ePqCRVXRV+q1St4JpJ+Uh JHymqqYEOnyfIyDx/lbpOrLtzTpAsEw3neDjltuXTUwP3xgLMhVwOrwWYhnjJrp3 iiZGqrH/lBt+26Lgf2y+iYpH3tEW1hzzq18fMDdOm2BDtFIZFHJ2LoILR8ZCUz+F 0HAxA0YSioKlgnUR6a5imPCqp+wbKJV8uJyXV226ihySF6Tlvwth9vjXD9UnQMgO 1rxO21osk8/Iy6AUx43QmmLxA+u5Agwu/wb3uwu+MNrSemRzQAWYA2/BdWMp+sc= =NQPR -----END PGP SIGNATURE----- --=-=-=--