From: "Allen S. Rout" <asr@ufl.edu>
To: emacs-orgmode@gnu.org
Subject: "global" variables in a babel document...
Date: Tue, 17 May 2016 15:24:00 -0400 [thread overview]
Message-ID: <nhfr4k$p1q$1@ger.gmane.org> (raw)
org-version
org "8.2.10"
emacs-version
"24.5.1"
I'm seeing what seems to be some inconsistent treatment of :var header
args. Or maybe I'm just missing something. I'm trying to follow:
http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html#Header-arguments-in-Org-mode-properties
and I find that the local :var works (of course) and the outline level
one also works, but the document-level one does not.
Minimal example, with my results, below.
I'm wondering if I'm thinking about the problem wrong. What I'm trying
to accomplish is setting, at a document level, a few variables which I
would like to be accessible in every code block in this document.
I know I can set them independently on every block, but that seems
tiresome.
- Allen S. Rout
-----
#+PROPERTY:header-args :var tsmuser="query"
* foo
:PROPERTIES:
:header-args: :var tsmpass="query"
:END:
#+name: toy
#+begin_src sh :var bloop="foo"
echo sss ${bloop} ddd
echo sss ${tsmpass} ddd
echo sss ${tsmuser} ddd
#+end_src
#+RESULTS: toy
| sss | foo | ddd |
| sss | query | ddd |
| sss | ddd | |
-----
next reply other threads:[~2016-05-18 1:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 19:24 Allen S. Rout [this message]
2016-05-18 16:50 ` "global" variables in a babel document Nicolas Goaziou
2016-05-19 8:55 ` Miguel Ruiz
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='nhfr4k$p1q$1@ger.gmane.org' \
--to=asr@ufl.edu \
--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).