From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zack Piper Subject: Re: Referring to an Org Babel variable in the invocation arguments to another Org Babel code block Date: Sun, 1 Jan 2017 16:15:22 +0000 Message-ID: <7c1389a5-10f5-dd79-5764-137ab48a9013@apertron.net> References: <87inq51q4o.fsf@apertron.net> <87h95p1bm2.fsf@apertron.net> <87d1gan3bl.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------631B4BDB46661E90960F54C2" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNin6-0004FW-QW for emacs-orgmode@gnu.org; Sun, 01 Jan 2017 11:15:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cNin1-0000Gk-Sq for emacs-orgmode@gnu.org; Sun, 01 Jan 2017 11:15:24 -0500 Received: from apertron.net ([137.74.201.49]:58186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNin1-0000GW-LE for emacs-orgmode@gnu.org; Sun, 01 Jan 2017 11:15:19 -0500 Received: from [192.168.8.235] (host-92-11-110-141.as43234.net [92.11.110.141]) by apertron.net (Postfix) with ESMTPSA id C43678EAA0 for ; Sun, 1 Jan 2017 16:15:08 +0000 (UTC) In-Reply-To: <87d1gan3bl.fsf@nicolasgoaziou.fr> 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" To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------631B4BDB46661E90960F54C2 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Hi Nicolas, I tried "c", and it gives me: >>> c <<< as the result. I would like it to use the _variable_ "c", not the literal string. So the result should be ">>> test <<<" I've also cleaned up the Org I made (something went wrong when I pasted it before, it missed an #+END_SRC) Thanks! #+NAME: block-1 #+BEGIN_SRC shell :var x="X" echo ">>>" $x "<<<" #+END_SRC #+END_SRC #+BEGIN_SRC shell :var c="test" y=block-1("c") echo $y #+END_SRC #+RESULTS: : >>> c <<< On 12/29/2016 03:49 PM, Nicolas Goaziou wrote: >> #+NAME: block-1 #+BEGIN_SRC shell :var x="X" echo ">>>" $x "<<<" >> #+END_SRC #+BEGIN_SRC shell :var c="test" y=block-1(c) echo $y >> #+END_SRC #+RESULTS: : >>> $c <<< --------------631B4BDB46661E90960F54C2 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit Hi Nicolas,
I tried "c", and it gives me:

>>> c <<<

as the result.

I would like it to use the _variable_ "c", not the literal string.
So the result should be ">>> test <<<"

I've also cleaned up the Org I made (something went wrong when I pasted it before, it missed an #+END_SRC)
Thanks!
#+NAME: block-1
#+BEGIN_SRC shell :var x="X"

echo ">>>" $x "<<<" #+END_SRC

#+END_SRC

#+BEGIN_SRC shell :var c="test" y=block-1("c")
echo $y
#+END_SRC

#+RESULTS:
: >>> c <<<

On 12/29/2016 03:49 PM, Nicolas Goaziou wrote:
#+NAME: block-1 #+BEGIN_SRC shell :var x="X" echo ">>>" $x "<<<" #+END_SRC #+BEGIN_SRC shell :var c="test" y=block-1(c) echo $y #+END_SRC #+RESULTS: : >>> $c <<<

--------------631B4BDB46661E90960F54C2--