Hi,

It would be useful to be able to use the noweb reference syntax to refer
to #+CALL: lines:

e.g.:

#+name: myFunction
#+BEGIN_SRC sh :var A="" :noweb yes
echo $A
#+END_SRC

#+CALL: myFunction[:results output](A="aaa") :noweb-ref mynoweb

#+header: :noweb yes
#+begin_src sh
<<mynoweb>>
#+end_src

#+RESULTS:
: aaa                     ( <<-- Fiction)

However it is not currently working for me.  It is not clear to me from
the manual whether it was ever possible so this is probably a Feature
Request.  (Unless is was possible then it may be a regression.)

My experiments are in the attached file if anyone wants to take a look.

Thanks,

Myles


* Function

#+name: myFunction
#+BEGIN_SRC sh :var A="" :noweb yes
echo $A
#+END_SRC

* Test 1 - FAILS

#+CALL: myFunction[:results output](A="aaa") :noweb-ref mynoweb

#+RESULTS: myFunction[:results output](A="aaa"):noweb-ref mynoweb
: aaa

Expect: ": aaa" :

#+header: :noweb yes
#+begin_src sh
<<mynoweb>>
#+end_src

#+RESULTS:

* Test 2 - FAILS

#+CALL: myFunction[:results output :noweb yes](A="aaa") :noweb-ref mynoweb2

#+RESULTS: myFunction[:results output :noweb yes](A="aaa"):noweb-ref mynoweb2
: aaa

Expect: ": aaa" :

#+header: :noweb yes
#+begin_src sh
<<mynoweb2>>
#+end_src

#+RESULTS:

* Test 3 - FAILS

#+CALL: myFunction[:results output :noweb yes](A="aaa") :noweb yes :noweb-ref 
mynoweb3

#+RESULTS: myFunction[:results output :noweb yes](A="aaa"):noweb yes :noweb-ref 
mynoweb3
: aaa

Expect: ": aaa" :

#+header: :noweb yes
#+begin_src sh
<<mynoweb3>>
#+end_src

#+RESULTS:

* Test 4 - WORKS
  Testing the :noweb-ref PROPERTY
** function
  :PROPERTIES:
  :noweb-ref: mynoweb4
  :END:
#+BEGIN_SRC sh :var A="" :noweb yes
echo $A
#+END_SRC

** result

#+header: :noweb yes
#+begin_src sh
<<mynoweb4>>
#+end_src

#+RESULTS:
|        |
| noCall |

* Test 5 - FAILS
  Testing the :noweb-ref PROPERTY with a CALL
** function
  :PROPERTIES:
  :noweb-ref: mynoweb5
  :END:

#+CALL: myFunction[:results output](A="aaa")

** result

#+header: :noweb yes
#+begin_src sh
<<mynoweb5>>
#+end_src

#+RESULTS:

* Test 6 - WORKS

#+name: noCall
#+header: :noweb yes :noweb-ref mynoweb4
#+begin_src sh 
echo "noCall"
#+end_src

#+RESULTS: noCall
: noCall

Expect: ": noCall" :

#+header: :noweb yes
#+begin_src sh
<<mynoweb4>>
#+end_src

#+RESULTS:
: noCall

Reply via email to