[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] BUG - Problem in tangle-mode
From: |
Rainer M Krug |
Subject: |
Re: [O] BUG - Problem in tangle-mode |
Date: |
Thu, 13 Jun 2013 09:28:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eric Schulte <address@hidden> 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: address@hidden
Skype: RMkrug
- Re: [O] Automatically adding local variables to tangled file, (continued)
- Re: [O] Automatically adding local variables to tangled file, Rainer M Krug, 2013/06/10
- [O] Problem in tangle-mode -- WAS: Automatically adding local variables to tangled file, Rainer M Krug, 2013/06/10
- Re: [O] Problem in tangle-mode -- WAS: Automatically adding local variables to tangled file, Eric Schulte, 2013/06/10
- [O] BUG - Problem in tangle-mode, Rainer M Krug, 2013/06/11
- Re: [O] BUG - Problem in tangle-mode, Eric Schulte, 2013/06/11
- Re: [O] BUG - Problem in tangle-mode, Rainer M Krug, 2013/06/11
- Re: [O] BUG - Problem in tangle-mode, Rainer M Krug, 2013/06/12
- Re: [O] BUG - Problem in tangle-mode, Eric Schulte, 2013/06/12
- Re: [O] BUG - Problem in tangle-mode,
Rainer M Krug <=
- [O] SOLVED: Automatically adding local variables to tangled file, Rainer M Krug, 2013/06/10
Re: [O] Automatically adding local variables to tangled file, Thorsten Jolitz, 2013/06/05