emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: William Kunkel <will@wkunkel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org-Babel concise named scalar variables
Date: Wed, 16 Apr 2014 06:55:59 -1000	[thread overview]
Message-ID: <m24n1tcixs.fsf@tsdye.com> (raw)
In-Reply-To: <CA+yBsdMdQv_CXyUxddbsq-j+LEgRPdw2Dcg4QQb+KQXzxmM4Wg@mail.gmail.com> (William Kunkel's message of "Wed, 16 Apr 2014 00:23:12 -0400")

Aloha Will,

You can set system-wide header arguments or set default values for a
buffer or heading.  See the Org mode manual, Section 14.8.1, Using
header arguments.

hth,
Tom

William Kunkel <will@wkunkel.com> writes:

> I'm just getting started using Org Babel and I've run into a bit of an
> annoyance that I can't seem to find an answer to in the Org Babel docs. I
> find myself wanting to use one variable in multiple code blocks, for
> example, the path to a file. Org Babel provides several mechanisms for
> including array/list types, via tables and lists with a #+NAME line before
> them. However the only mechanism it provides for single variables is #+NAME
> before example blocks, which just seem clunky for something as trivial as a
> file path or numeric variable. Is there a more concise way to do simple
> variables, or am I stuck with the named example blocks?
>
> Thanks,
> Will
> I'm just getting started using Org Babel and I've run into a bit of an
> annoyance that I can't seem to find an answer to in the Org Babel
> docs. I find myself wanting to use one variable in multiple code
> blocks, for example, the path to a file. Org Babel provides several
> mechanisms for including array/list types, via tables and lists with a
> #+NAME line before them. However the only mechanism it provides for
> single variables is #+NAME before example blocks, which just seem
> clunky for something as trivial as a file path or numeric variable. Is
> there a more concise way to do simple variables, or am I stuck with
> the named example blocks?
>
> Thanks,
> Will
>

-- 
Thomas S. Dye
http://www.tsdye.com

      parent reply	other threads:[~2014-04-16 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  4:23 Org-Babel concise named scalar variables William Kunkel
2014-04-16 16:48 ` Achim Gratz
2014-04-16 16:55 ` Thomas S. Dye [this message]

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=m24n1tcixs.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=will@wkunkel.com \
    /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).