Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-21 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Eric On 21/07/2010 18:50, Eric Schulte wrote: > Hi Rainer, > > Thanks for your patience and persistence. I've pushed up what I believe > should be a fix for this excess buffer movement. There still may be > some issues with things like ess-load-

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-21 Thread Eric Schulte
Hi Rainer, Thanks for your patience and persistence. I've pushed up what I believe should be a fix for this excess buffer movement. There still may be some issues with things like ess-load-file, but those can now optionally be squashed by wrapping your hook functions with `save-window-excursion'

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-21 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21/07/2010 09:49, Rainer M Krug wrote: > On 21/07/2010 09:23, Rainer M Krug wrote: >> Hi Eric > > >> On 21/07/2010 00:41, Eric Schulte wrote: >>> Hi Rainer, > >>> I see the problem. When ess-load-file is called an even number of >>> times, it re

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-21 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21/07/2010 09:23, Rainer M Krug wrote: > Hi Eric > > > On 21/07/2010 00:41, Eric Schulte wrote: >> Hi Rainer, > >> I see the problem. When ess-load-file is called an even number of >> times, it results in flip-flopped buffers. I'm not sure of a

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-21 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Eric On 21/07/2010 00:41, Eric Schulte wrote: > Hi Rainer, > > I see the problem. When ess-load-file is called an even number of > times, it results in flip-flopped buffers. I'm not sure of a good Thanks for the clarification. > solution here

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-20 Thread Eric Schulte
Hi Rainer, I see the problem. When ess-load-file is called an even number of times, it results in flip-flopped buffers. I'm not sure of a good solution here, aside from possibly tangling to a 3rd file, e.g. #+begin_src R :tangle /tmp/nothing.R y <- 9 #+end_src to ensure a good final balance.

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-20 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Eric I just discovered a "switching of buffers" when tangling the following org file with the new org-babel-post-tangle-hook. Otherwise it is working perfectly now. # ** tangle R and load :PROPERTIES

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-19 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/07/2010 00:58, Eric Schulte wrote: > Hi Rainer, > > I've just pushed up a fix for the org-babel-post-tangle-hook. > > With a minimal org-babel configuration, if I open the following file. > > --8<---cut here---start

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-16 Thread Eric Schulte
Hi Rainer, I've just pushed up a fix for the org-babel-post-tangle-hook. With a minimal org-babel configuration, if I open the following file. --8<---cut here---start->8--- ** tangle R and load :PROPERTIES: :tangle: to-load.r :END: evaluate this #+beg

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-15 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/07/2010 10:14, Dr Rainer M Krug wrote: > On 12/07/2010 19:51, Eric Schulte wrote: >> Rainer M Krug writes: > >>> Hi Eric, >>> >>> On Fri, Jul 9, 2010 at 5:44 PM, Eric Schulte wrote: >>> Hi Rainer, Rainer M Krug writes: >>>

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-13 Thread Dr Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/07/2010 19:51, Eric Schulte wrote: > Rainer M Krug writes: > >> Hi Eric, >> >> On Fri, Jul 9, 2010 at 5:44 PM, Eric Schulte wrote: >> >>> Hi Rainer, >>> >>> Rainer M Krug writes: >>> On Thu, Jul 8, 2010 at 9:03 PM, Eric Schulte >>> wrot

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-12 Thread Eric Schulte
Rainer M Krug writes: > Hi Eric, > > On Fri, Jul 9, 2010 at 5:44 PM, Eric Schulte wrote: > >> Hi Rainer, >> >> Rainer M Krug writes: >> >> > On Thu, Jul 8, 2010 at 9:03 PM, Eric Schulte >> wrote: >> [...] >> >> >> >> (add-hook 'org-babel-post-tangle-hook >> >> (lambda () (ess-load-fil

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-12 Thread Rainer M Krug
Hi Eric, On Fri, Jul 9, 2010 at 5:44 PM, Eric Schulte wrote: > Hi Rainer, > > Rainer M Krug writes: > > > On Thu, Jul 8, 2010 at 9:03 PM, Eric Schulte > wrote: > [...] > >> > >> (add-hook 'org-babel-post-tangle-hook > >> (lambda () (ess-load-file (buffer-file-name > >> > > > > Unf

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-09 Thread Eric Schulte
Hi Rainer, Rainer M Krug writes: > On Thu, Jul 8, 2010 at 9:03 PM, Eric Schulte wrote: [...] >> >> (add-hook 'org-babel-post-tangle-hook >> (lambda () (ess-load-file (buffer-file-name >> > > Unfortunately, this does not work. I put the code above into my > emacs.organd nothing happ

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-09 Thread Rainer M Krug
On Thu, Jul 8, 2010 at 9:03 PM, Eric Schulte wrote: > Hi Rainer, > Hi Eric > > I just pushed up a new hook `org-babel-post-tangle-hook' which can be > used to run activities in tangled code files immediately after tangling. > I believe the following can be used implement the feature you descri

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-08 Thread Eric Schulte
Hi Rainer, I just pushed up a new hook `org-babel-post-tangle-hook' which can be used to run activities in tangled code files immediately after tangling. I believe the following can be used implement the feature you described with this hook. (add-hook 'org-babel-post-tangle-hook (lambda

[Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-06 Thread Rainer M Krug
Hi I am using org-babel for literate programming in R and I am using the following approach to test the code: 1) tangle 2) refresh buffer containing the tangled code (I use auto-revert-mode or global-auto-revert-mode for that) 3) load the tangled file into an existing R session via ESS R for eval