From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: BUG - Problem in tangle-mode Date: Thu, 13 Jun 2013 09:28:48 +0200 Message-ID: <87r4g6v58v.fsf@krugs.de> References: <878v2omz5g.fsf@krugs.de> <51af4bfd.0c95ec0a.2372.097e@mx.google.com> <87ehcf6xey.fsf@gmail.com> <87ehcewdye.fsf@krugs.de> <8738ssmoyl.fsf@gmail.com> <87k3m21jhc.fsf@krugs.de> <8761xmgtpy.fsf_-_@krugs.de> <87k3m2hsa2.fsf@gmail.com> <87bo7dds7g.fsf_-_@krugs.de> <878v2gh6ea.fsf@gmail.com> <8761xjl5qo.fsf@krugs.de> <87wqpzvwdu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un1xo-0006bB-Ai for emacs-orgmode@gnu.org; Thu, 13 Jun 2013 03:28:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Un1xl-0003vE-L1 for emacs-orgmode@gnu.org; Thu, 13 Jun 2013 03:28:56 -0400 Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:43686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un1xl-0003v1-FV for emacs-orgmode@gnu.org; Thu, 13 Jun 2013 03:28:53 -0400 Received: by mail-wg0-f49.google.com with SMTP id a12so5789331wgh.28 for ; Thu, 13 Jun 2013 00:28:52 -0700 (PDT) In-Reply-To: <87wqpzvwdu.fsf@gmail.com> (Eric Schulte's message of "Wed, 12 Jun 2013 15:42:37 -0600") 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: Eric Schulte Cc: "emacs-orgmode@gnu.org" Eric Schulte writes: >> >> Hi >> >> it seems that I have no luck at the moment. >> >> Now the post tangle hook does not seem to be called. >> > > It is called, however the shell script you are trying to execute is not > executing because it is not set as executable. The permissions of > tangled files are set *after* the post-tangle hook is called (so that > the post-tangle hook has a chance to modify files which will eventually > be set to read only). That makes perfect sense - thanks. > > You example is trying to run a tangled shell script before it is set to > be executable. This can not work. My attached alternative of your > example does run the shell script by not assuming it is executable. OK - I will adapt it accordingly. Thanks a lot, Rainer > > #+PROPERTY: tangle ./test.R > > * Internal configurations :noexport: > ** Evaluate to run post tangle script > #+begin_src emacs-lisp :results silent :tangle no :exports none > (add-hook 'org-babel-post-tangle-hook > (lambda () > (message "running the post-tangle shell script") > (shell-command "bash ./postTangleScript.sh"))) > #+end_src > > ** Post tangle script > #+begin_src sh :tangle postTangleScript.sh :results silent > touch PostTangleScriptHasBeenExecuted > #+end_src > > * Two blocks > Block 1 > #+begin_src R > suitName <- function(species) > { > return( paste(species$layer, "suitability", sep="_") ) > } > #+end_src > > Block 2 > #+begin_src R > statDistName <- function(species){ > return( paste(species$layer, "disturbances_static", sep="_") ) > } > #+end_src <#secure method=pgpmime mode=sign> -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug