From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: tangle on export Date: Thu, 24 Sep 2015 15:36:34 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf6hZ-000571-M9 for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 09:36:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf6hV-0007xi-Kd for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 09:36:45 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:15879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf6hV-0007wS-F7 for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 09:36:41 -0400 In-Reply-To: (Rainer M. Krug's message of "Thu, 24 Sep 2015 13:17:38 +0200") 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: Rainer M Krug Cc: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Rainer, On 2015-09-24 13:17, Rainer M Krug writes: > Alan Schmitt writes: > >> Hello, >> >> I have a question I feel is very basic but I did not find the answer in >> the manual. How can I trigger the tangling of a block upon export. > > Tangling and exporting are two different paths (well - one could see > tangling as a special case of exporting). > > You have to use an export hook (see > http://orgmode.org/tmp/worg/org-configs/org-hooks.html for a list of > hooks in org). > > I have done something similar to run a post-tangle hook: > > #+begin_src emacs-lisp > (defvar org-babel-tangle-run-postTangleScript nil > "If non-nil, postTangleScript.sh will be executed") > (put 'org-babel-tangle-run-postTangleScript 'safe-local-variable 'boolean= p) > > (defun org-babel-run-post-tangle-script () > (when org-babel-tangle-run-postTangleScript > (message "running the postTangleScript.sh bash shell script") > (shell-command "bash ./postTangleScript.sh"))) > > (add-hook 'org-babel-post-tangle-hook 'org-babel-run-post-tangle-script) > #+end_src Thanks, I=E2=80=99ll give this a try. Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO=E2=82=82 (Updated September 22, 2015, Mauna Loa Obs.): 397.= 23 ppm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWA/xiAAoJEAQNCjtO0uXHxVwH/i0B4iSRL8gBVvt8fjFYAW/p vY3ow4qFEzh1cHybxDzqEqm2YpHqbyWK69zi+YAquyDuBQRAzgzjBKo5X8zSqhJf cbYVE4T8N0k8xuOFlX3C+2zG7MKZiGOroEoD9yaIG8aIBPQmYXBVn0ZP1/gPcYL2 q1SuTvdvzonUcc7GvIxGYjaDgWJHUux8AfpOrRY6/1+/2K/Vh5dN1bg6zn4SDsbA IEAlUDjtV8p5f2bjItxyjvdMNQAlmiAKeaJ8ya7N/BKfW6PTchQyPZhdQgzZ8e3N 8hROTykYYaMQ4NP0Ai9UjbqhfRWueRTGp0imAS8EnXaIJMAmB4MKsYyT+iPhXyc= =M8+g -----END PGP SIGNATURE----- --=-=-=--