From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: org-babel order of evaluation Date: Wed, 11 Jan 2012 19:25:06 -0500 Message-ID: <20120112002506.GA26183@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rl8kn-00056e-6q for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 19:42:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rl8km-00004z-8O for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 19:42:53 -0500 Received: from [204.62.15.78] (port=48205 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rl8km-0008WT-22 for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 19:42:52 -0500 Received: from BigDog.local (pool-173-68-170-125.nycmny.fios.verizon.net [173.68.170.125]) by mail.rickster.com (Postfix) with ESMTPS id E4593221AC for ; Wed, 11 Jan 2012 19:25:06 -0500 (EST) Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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"))