emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-Babel concise named scalar variables
@ 2014-04-16  4:23 William Kunkel
  2014-04-16 16:48 ` Achim Gratz
  2014-04-16 16:55 ` Thomas S. Dye
  0 siblings, 2 replies; 3+ messages in thread
From: William Kunkel @ 2014-04-16  4:23 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 725 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org-Babel concise named scalar variables
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Achim Gratz @ 2014-04-16 16:48 UTC (permalink / raw)
  To: emacs-orgmode

William Kunkel writes:
> Is there a more concise way to do simple variables, or am I stuck with
> the named example blocks?

It seems you'll want to define those through "var" properties.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org-Babel concise named scalar variables
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas S. Dye @ 2014-04-16 16:55 UTC (permalink / raw)
  To: William Kunkel; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-16 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).