* noweb reference to #+call
@ 2013-01-03 16:15 Myles English
0 siblings, 0 replies; only message in thread
From: Myles English @ 2013-01-03 16:15 UTC (permalink / raw)
To: org-mode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
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
[-- Attachment #2: noweb.org --]
[-- Type: text/plain, Size: 1661 bytes --]
* 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-03 16:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 16:15 noweb reference to #+call Myles English
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).