From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: org-babel order of evaluation Date: Thu, 12 Jan 2012 07:43:41 -0700 Message-ID: <87y5td7z2t.fsf@gmx.com> References: <20120112002506.GA26183@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlM18-0006wx-JO for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 09:52:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlM12-00062M-6K for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 09:52:38 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:54359) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RlM11-000622-VV for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 09:52:32 -0500 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 Rick Frankel writes: > 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. > It would be better to make the dependency explicit by passing the results of the call line as a (potentially unused) variable to the code block. For example; #+name: three(v="three") #+begin_src elisp :var foo=one("two") v #+end_src There is (at least currently) no guarantee that evaluation order will be buffer order. -- Eric Schulte http://cs.unm.edu/~eschulte/