From: "Eric Schulte" <schulte.eric@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [Babel] pass through header arguments on #+call: lines
Date: Mon, 08 Nov 2010 14:33:22 -0700 [thread overview]
Message-ID: <87fwvbo5zx.fsf@gmail.com> (raw)
There has been some recent discussion/questions regarding how to pass
header arguments through to a code block being called using a #+call
line. I've just pushed up a change which makes this possible. Call
lines now have the following syntax, where each header argument portion
is optional.
#+call: block-name[:header args for block](arguments) :header args for call line
here's a (possibly) illuminating example
#+source: echo
#+begin_src emacs-lisp :var n="me"
(message "hi %s" n)
#+end_src
#+call: echo()
#+results: echo()
: hi me
#+call: echo(n="you")
#+results: echo(n="you")
: hi you
#+call: echo[:var n="you"]()
#+results: echo[:var n="you"]()
: hi you
#+call: echo() :results vector
| hi me |
#+call: echo() :var n="you"
: hi me
Best -- Eric
reply other threads:[~2010-11-08 21:43 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fwvbo5zx.fsf@gmail.com \
--to=schulte.eric@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.