emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Frankel <rick@rickster.com>
To: emacs-orgmode@gnu.org
Subject: org-babel order of evaluation
Date: Wed, 11 Jan 2012 19:25:06 -0500	[thread overview]
Message-ID: <20120112002506.GA26183@BigDog.local> (raw)

There is a problem with the order of execution of interspersed source
and call blocks will not be executed in order because of the way
org-babel-execute-buffer is written (first all the source blocks, then
all the call blocks). 

Therefore, when executing an entire buffer, there is no way to have
the execution of a call block dependent on the prior execution of a
source block.

Given the following:

	#+name: one(v="one")
	#+begin_src elisp
	v
	#+end_src

	#+call: one("two")

	#+name: three(v="three")
	#+begin_src elisp
	v
	#+end_src

The message buffer shows:

	executing Elisp code block (one)...

	(v (quote "one"))

	Code block evaluation complete.
	executing Elisp code block (three)...

	(v (quote "three"))

	Code block evaluation complete.
	executing Elisp code block (one)...

	(v (quote "two"))

	"two"
	executing Emacs-Lisp code block...

	(results (quote "two"))

             reply	other threads:[~2012-01-12  0:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12  0:25 Rick Frankel [this message]
2012-01-12 14:43 ` org-babel order of evaluation Eric Schulte
2012-01-12 22:35   ` Leo Alekseyev
2012-01-12 22:51     ` Rick Frankel
2012-01-13  1:07       ` Eric Schulte
2012-01-13  1:52         ` Rick Frankel
2012-01-20 17:58           ` Leo Alekseyev
2012-01-23 17:56             ` Eric Schulte

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=20120112002506.GA26183@BigDog.local \
    --to=rick@rickster.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).