emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Buffer-wide definitions in org-babel


From: Juan Reyero
Subject: Re: [Orgmode] Buffer-wide definitions in org-babel
Date: Thu, 8 Oct 2009 13:16:11 +0200

Hi,

On Wed, Oct 7, 2009 at 9:17 PM, Eric Schulte <address@hidden> wrote:
> As you described below the :session environment can be used to deal with
> the need for required "stage setting" source-code blocks, however there
> is currently no way when directly executing a block to specify that some
> other block in the same session must be evaluated first to setup the
> environment.
>
> Perhaps a new header argument named :requires would be useful here.
> This would allow any block to "require" that some other named
> source-code block be prepended to it's self before evaluation.

Sounds like a good solution.  Another possibility would be to add an
option that makes chunks dependent on other chunks that appear earlier
in the buffer.  It is less general, but possibly simpler to implement
(you don't have to worry about circular dependencies) and less
verbose.  If you could assume a functional style without side effects
you could even track which chunks are up-to-date, and only re-compute
from the first one not up-to-date in the buffer onwards to the chunk
you are being asked to process.  This could be yet another option.

Best,

jm
-- 
http://juanreyero.com/blog




reply via email to

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