From mboxrd@z Thu Jan  1 00:00:00 1970
From: Thomas S. Dye <tsd@tsdye.com>
Subject: Re: babel header arguments tutorial?
Date: Sun, 27 Sep 2015 06:47:48 -1000
Message-ID: <m237xzyfkb.fsf@tsdye.com>
References: <CAFAhFSUZLQSGYG9du9gDv+F2en1UqUJ8nYm93zVT2FQh-HLJ1w@mail.gmail.com>
	<87zj08zvcl.fsf@pierrot.dokosmarshall.org>
	<m24migyf7e.fsf@tsdye.com>
	<87vbawziq2.fsf@pierrot.dokosmarshall.org>
Mime-Version: 1.0
Content-Type: text/plain
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52677)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tsd@tsdye.com>) id 1ZgF7V-000700-L3
	for emacs-orgmode@gnu.org; Sun, 27 Sep 2015 12:48:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tsd@tsdye.com>) id 1ZgF7S-0006aS-Bv
	for emacs-orgmode@gnu.org; Sun, 27 Sep 2015 12:48:13 -0400
Received: from gproxy9-pub.mail.unifiedlayer.com ([69.89.20.122]:43194)
	by eggs.gnu.org with smtp (Exim 4.71) (envelope-from <tsd@tsdye.com>)
	id 1ZgF7S-0006ZL-5D
	for emacs-orgmode@gnu.org; Sun, 27 Sep 2015 12:48:10 -0400
In-reply-to: <87vbawziq2.fsf@pierrot.dokosmarshall.org>
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: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org

Aloha Nick,

Nick Dokos <ndokos@gmail.com> writes:

> Thomas S. Dye <tsd@tsdye.com> writes:
>
>> Aloha Nick,
>>
>> Nick Dokos <ndokos@gmail.com> writes:
>>
>>> 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.
>>
>> Can you elaborate why the eval mechanism should be used only when
>> absolutely necessary?  You've mentioned that a few times but I haven't
>> run across similar warnings elsewhere.
>>
>
> It's a matter of safety: eval allows you to evaluate arbitrary lisp
> code. Doing that in a local-variables block which is run when you
> open the file can lead to all kinds of damage. If you get a file
> with an eval in the local variables section, you'd better be very
> sure before opening the file in emacs.
>
> Here's one warning:
>
> http://www.gnu.org/software/emacs/manual/html_node/emacs/Safe-File-Variables.html

Thanks for the clarification.  Emacs' built-in paranoia seems
appropriate, I guess.  I get asked if I want to evaluate local variables
that might not be safe and one of my choices is to say no, in which case
the file is opened without evaluating them.  At that point I can look at
the code they propose to run and convince myself there is no mischief.

All the best,
Tom

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