emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eric Schulte
Subject: Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file
Date: Thu, 08 Jul 2010 12:03:29 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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 () (ess-load-file (buffer-file-name))))

Best -- Eric

Rainer M Krug <address@hidden> writes:

> 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 evaluation
>
> This involves switching between buffers in always the same sequence.
> Therefore my suggestion:
>
> would it be possible to have a tangle-and-evaluate-tangled-file funcction,
> which is doing this automatically?
>
> C-c - 0 and org-babel-execute-buffer do not work in this case, as functions
> are split over several code blocks in R.
>
> Cheers,
>
> Rainer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]