From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: How do I chain babel blocks with arguments? Date: Tue, 22 Apr 2014 07:30:39 -0400 Message-ID: <87sip5ha70.fsf@gmail.com> References: <87d2gg0xjc.fsf@gmail.com> <87oazwdb0y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcYvk-0000U1-Ae for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 07:32:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcYvf-0001h6-Iu for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 07:32:04 -0400 Received: from mail-qc0-x229.google.com ([2607:f8b0:400d:c01::229]:50882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcYvf-0001f2-Dj for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 07:31:59 -0400 Received: by mail-qc0-f169.google.com with SMTP id i17so5301378qcy.0 for ; Tue, 22 Apr 2014 04:31:58 -0700 (PDT) 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: Alan Schmitt Cc: emacs-orgmode , Eric Schulte Alan Schmitt writes: > Hi Eric, > > On 2014-04-20 03:41, Eric Schulte writes: > >>> --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") >> ^ >> The above line has an error, your "z" should be an "x". > > I tried this change, and the argument is not taken into account: > > --8<---------------cut here---------------start------------->8--- > #+call: test4(x="BAZ") > > #+results: > : "bar" > --8<---------------cut here---------------end--------------->8--- > Sorry, that's because the "x" should be "z". See the following. --8<---------------cut here---------------start------------->8--- #+name: z : "bar" #+name: test3 #+begin_src emacs-lisp :var x="foo" x #+end_src #+RESULTS: test3 : foo #+name:test4 #+begin_src emacs-lisp :var y=test3(x=z) y #+end_src #+results: test4 : "bar" #+call: test4(y="BAZ") #+RESULTS: : BAZ --8<---------------cut here---------------end--------------->8--- > > I'm not sure I mentioned it earlier, but I found a workaround using > `org-sbe'. > Yes, I had noticed, but simple argument passing is also sufficient. Best, > > Thanks, > > Alan -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D