emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] babel header arguments tutorial?


From: Nick Dokos
Subject: Re: [O] babel header arguments tutorial?
Date: Sat, 26 Sep 2015 18:09:14 -0400
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Lawrence Bottorff <address@hidden> writes:

> I seeĀ thisĀ and find the bottom section ("Setting language and file
> specific default header argument value") intriguing, however too
> cryptic. Can someone explain what's going on here and how to use it?
>

Each language defines a variable where you can set header args that will
apply to *all* code block for that language (and there is a
language-independent variable too: org-babel-default-header-args). What
the document you linked to suggests is that you can set such variables
as local file variables (i.e. they are set as part of opening the file
and they are set for that file only).

The mechanism is bog-standard emacs: see (info "(emacs) file variables")
for the details.

The implementation on the page you linked contains a typo (capital P
instead of lower-case p in python) and is much more prolix than it needs
to be. You can get the same effect with

# Local Variables:
# org-babel-default-header-args:python: ((:session . "foo")))
# End:

This form should be preferred for just setting variables. The eval
mechanism should be used only when absolutely necessary.

HTH
-- 
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]