[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How do I chain babel blocks with arguments?
From: |
Alan Schmitt |
Subject: |
Re: [O] How do I chain babel blocks with arguments? |
Date: |
Tue, 22 Apr 2014 14:47:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) |
Hi Eric,
On 2014-04-22 13:30, Eric Schulte <address@hidden> 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.
Thanks,
Alan
- Re: [O] How do I chain babel blocks with arguments?, (continued)
Re: [O] How do I chain babel blocks with arguments?, Eric Schulte, 2014/04/17