[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How do I chain babel blocks with arguments?
From: |
Eric Schulte |
Subject: |
Re: [O] How do I chain babel blocks with arguments? |
Date: |
Wed, 23 Apr 2014 19:16:00 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Alan Schmitt <address@hidden> writes:
> 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.
>
I see, then sbe is probably the way to go.
Best,
>
> Thanks,
>
> Alan
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D
- 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