emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to use noweb reference with argument in other languages?


From: Kaushal Modi
Subject: Re: [O] How to use noweb reference with argument in other languages?
Date: Mon, 19 Jun 2017 10:21:17 +0000

On Mon, Jun 19, 2017, 12:59 AM address@hidden <address@hidden> wrote:
I found noweb reference with argument `<<src-block-name(args)>>` 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, "
<<sh-print-something(str="stardiviner")>>
#+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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]