emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Juan Reyero <joanmg@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Buffer-wide definitions in org-babel
Date: Thu, 8 Oct 2009 13:16:11 +0200	[thread overview]
Message-ID: <55bd243d0910080416u27bb9debjd9a5d9d86bc06231@mail.gmail.com> (raw)
In-Reply-To: <m23a5vau8p.fsf@gmail.com>

Hi,

On Wed, Oct 7, 2009 at 9:17 PM, Eric Schulte <schulte.eric@gmail.com> 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	other threads:[~2009-10-08 11:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 14:20 Buffer-wide definitions in org-babel Juan Reyero
2009-10-07 18:48 ` Eric Schulte
2009-10-07 19:17   ` Eric Schulte
2009-10-08 11:16     ` Juan Reyero [this message]
2009-10-08  9:22   ` Juan Reyero
2009-10-08 14:11     ` Dan Davison
2009-10-09 14:53       ` Juan Reyero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55bd243d0910080416u27bb9debjd9a5d9d86bc06231@mail.gmail.com \
    --to=joanmg@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).