From: Myles English <mylesenglish@gmail.com>
To: org-mode Mailinglist <emacs-orgmode@gnu.org>
Subject: noweb reference to #+call
Date: Thu, 03 Jan 2013 16:15:41 +0000 [thread overview]
Message-ID: <87ip7e4502.fsf@gmail.com> (raw)
[-- 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
reply other threads:[~2013-01-03 16:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ip7e4502.fsf@gmail.com \
--to=mylesenglish@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).