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 'booleanp) > > (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’ll give this a try. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO₂ (Updated September 22, 2015, Mauna Loa Obs.): 397.23 ppm