From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: How do I chain babel blocks with arguments? Date: Fri, 18 Apr 2014 08:43:39 +0200 Message-ID: References: <87d2gg0xjc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wb2xi-0001jc-Tv for emacs-orgmode@gnu.org; Fri, 18 Apr 2014 03:11:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wb2xc-00016m-SE for emacs-orgmode@gnu.org; Fri, 18 Apr 2014 03:11:50 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:11990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wb2xc-00016T-LO for emacs-orgmode@gnu.org; Fri, 18 Apr 2014 03:11:44 -0400 In-Reply-To: <87d2gg0xjc.fsf@gmail.com> (Eric Schulte's message of "Thu, 17 Apr 2014 00:42:26 -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: Eric Schulte Cc: emacs-orgmode Hi Eric, On 2014-04-17 07:42, Eric Schulte writes: > Alan Schmitt writes: > >> How can I execute block `test1' from block `test2' by passing an >> argument that is one from test2? >> > > #+name: z > : bar > #+name: test1 > #+begin_src emacs-lisp :var x="foo" > x > #+end_src > > #+name:test2 > #+begin_src emacs-lisp :var y=test1(x=z) > y > #+end_src > #+RESULTS: test2 > : bar Thank you for the suggestion, but I'm afraid it does not do what I want: I cannot pass a different argument 'z' to test2 (called test4 in the following snippet): --8<---------------cut here---------------start------------->8--- #+name: z : "bar" #+name: test3 #+begin_src emacs-lisp :var x="foo" x #+end_src #+name:test4 #+begin_src emacs-lisp :var y=test1(x=z) y #+end_src #+results: test4 : "bar" #+call: test4(z="BAZ") #+results: : "bar" --8<---------------cut here---------------end--------------->8--- In this case, org-sbe works great, and I've been able to achieve what I want. I still need to clean it up before describing it to the list. Thanks again, Alan