From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: BUG - Problem in tangle-mode Date: Wed, 12 Jun 2013 15:42:37 -0600 Message-ID: <87wqpzvwdu.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmspQ-0003bZ-PZ for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 17:43:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmspP-0000BT-MH for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 17:43:40 -0400 Received: from mail-pb0-x22c.google.com ([2607:f8b0:400e:c01::22c]:32846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmspP-0000BD-FJ for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 17:43:39 -0400 Received: by mail-pb0-f44.google.com with SMTP id uo1so4858741pbc.17 for ; Wed, 12 Jun 2013 14:43:38 -0700 (PDT) In-Reply-To: <8761xjl5qo.fsf@krugs.de> (Rainer M. Krug's message of "Wed, 12 Jun 2013 17:15:59 +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@gnu.org" --=-=-= Content-Type: text/plain > > 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). 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. --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=example.org #+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 --=-=-= Content-Type: text/plain -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--