From mboxrd@z Thu Jan  1 00:00:00 1970
From: Nick Dokos <ndokos@gmail.com>
Subject: Re: babel header arguments tutorial?
Date: Sat, 26 Sep 2015 18:09:14 -0400
Message-ID: <87zj08zvcl.fsf@pierrot.dokosmarshall.org>
References: <CAFAhFSUZLQSGYG9du9gDv+F2en1UqUJ8nYm93zVT2FQh-HLJ1w@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55041)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1ZfxfJ-0002fd-Ti
	for emacs-orgmode@gnu.org; Sat, 26 Sep 2015 18:09:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1ZfxfG-0004be-O9
	for emacs-orgmode@gnu.org; Sat, 26 Sep 2015 18:09:57 -0400
Received: from plane.gmane.org ([80.91.229.3]:54734)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1ZfxfG-0004bV-He
	for emacs-orgmode@gnu.org; Sat, 26 Sep 2015 18:09:54 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1Zfxew-0005WE-Se
	for emacs-orgmode@gnu.org; Sun, 27 Sep 2015 00:09:35 +0200
Received: from pool-108-20-41-232.bstnma.fios.verizon.net ([108.20.41.232])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <emacs-orgmode@gnu.org>; Sun, 27 Sep 2015 00:09:34 +0200
Received: from ndokos by pool-108-20-41-232.bstnma.fios.verizon.net with local
	(Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <emacs-orgmode@gnu.org>; Sun, 27 Sep 2015 00:09:34 +0200
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
To: emacs-orgmode@gnu.org

Lawrence Bottorff <borgauf@gmail.com> 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