From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: How do I chain babel blocks with arguments? Date: Wed, 23 Apr 2014 19:16:00 -0600 Message-ID: <87tx9j5xkn.fsf@gmail.com> References: <87d2gg0xjc.fsf@gmail.com> <87oazwdb0y.fsf@gmail.com> <87sip5ha70.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wd8P7-0005Kd-2g for emacs-orgmode@gnu.org; Wed, 23 Apr 2014 21:24:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wd8P1-00027o-Sd for emacs-orgmode@gnu.org; Wed, 23 Apr 2014 21:24:45 -0400 Received: from mail-pb0-x230.google.com ([2607:f8b0:400e:c01::230]:33953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wd8P1-00027j-Ko for emacs-orgmode@gnu.org; Wed, 23 Apr 2014 21:24:39 -0400 Received: by mail-pb0-f48.google.com with SMTP id md12so1376331pbc.7 for ; Wed, 23 Apr 2014 18:24:38 -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 Alan Schmitt writes: > Hi Eric, > > On 2014-04-22 13:30, Eric Schulte writes: > >> Sorry, that's because the "x" should be "z". See the following. >> >> #+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 > > I'm afraid I'm not being clear: I want to use the result of `test3' in > the computation done to test4. Intuitively, I want test4 to be something > like: "(lambda (x) (... (test3 x) ...))". This is why I was writing > a header of the form: > >> #+begin_src emacs-lisp :var x="foo" :var y=test3(x) > > where x would be given by the call to the block, and y would only be > used internally. > I see, then sbe is probably the way to go. Best, > > Thanks, > > Alan -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D