From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: How to use noweb reference with argument in other languages? Date: Mon, 19 Jun 2017 10:21:17 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1140213e80da2705524d7ffc" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMtoJ-0006d0-UI for emacs-orgmode@gnu.org; Mon, 19 Jun 2017 06:21:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMtoI-0000fK-Qb for emacs-orgmode@gnu.org; Mon, 19 Jun 2017 06:21:31 -0400 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:34788) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMtoI-0000eR-Hz for emacs-orgmode@gnu.org; Mon, 19 Jun 2017 06:21:30 -0400 Received: by mail-lf0-x22a.google.com with SMTP id v20so52586811lfa.1 for ; Mon, 19 Jun 2017 03:21:30 -0700 (PDT) In-Reply-To: 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: Christopher Miles , emacs-org list --001a1140213e80da2705524d7ffc Content-Type: text/plain; charset="UTF-8" On Mon, Jun 19, 2017, 12:59 AM numbchild@gmail.com wrote: > I found noweb reference with argument `<>` issue. > It has been working fine for me for org and sh source blocks. And this does not work: > ```org > #+NAME: sh-print-something > #+BEGIN_SRC sh :var str="" > echo "$str" > #+END_SRC > > #+BEGIN_SRC sh :results output :noweb yes > echo "hello, " > <> > #+END_SRC > You need to use :noweb-ref option in the source blocks header args to set the noweb-ref code reference; #+NAME will not work. I have to have used noweb for the very first time in this recent project: https://raw.githubusercontent.com/kaushalmodi/eless/master/eless.org ; search for ":noweb-ref" in there to get an idea. > -- Kaushal Modi --001a1140213e80da2705524d7ffc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jun 19, 2017, 12:59 AM = numbchild@gmail.com <numbchild@gmail.com> wrote:
I found noweb = reference with argument `<<src-block-name(args)>>` issue.
=

It has been working fine for m= e for org and sh source blocks.=C2=A0

And this does not work:
```org
#+NAME: sh-print-something
#+BEGIN_SRC sh := var str=3D""
echo "$str"
#+END_SRC=
=
#+BEGIN_SRC sh :results output :noweb yes
echo "hello= , "
<<sh-print-something(str=3D"stardiviner")>= ;>
#+END_SRC

You need to use :noweb-ref option =C2=A0in the source block= s header args to set the noweb-ref code reference; #+NAME will not work.

I have to have used noweb for the very first time in= this recent project:=C2=A0https://raw.githubusercontent.com/kaushalm= odi/eless/master/eless.org ; search for ":noweb-ref" in there= to get an idea.=C2=A0
--

Kaushal Modi

--001a1140213e80da2705524d7ffc--