From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: How do I chain babel blocks with arguments? Date: Wed, 16 Apr 2014 19:04:53 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaTGj-00029j-Fr for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 13:05:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaTGb-0005T7-To for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 13:05:05 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:25479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaTGb-0005Sc-Nd for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 13:04:57 -0400 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 Hello, I have several babel blocks that each work well, but I'm now trying to chain them to build some bigger functionality out of them. I'm having trouble finding out how to pass arguments between blocks. Here is a small example: --8<---------------cut here---------------start------------->8--- #+name: test1 #+begin_src emacs-lisp :var x="foo" x #+end_src #+name:test2 #+begin_src emacs-lisp :var z="bar" :var y=test1(x=z) y #+end_src #+call: test2(z="baz") --8<---------------cut here---------------end--------------->8--- Unfortunately this does not work: the evaluation of block `test2' fails by telling me `z' does not exist. How can I execute block `test1' from block `test2' by passing an argument that is one from test2? Thanks, Alan