From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: babel header arguments tutorial? Date: Sat, 26 Sep 2015 22:41:57 -0400 Message-ID: <87vbawziq2.fsf@pierrot.dokosmarshall.org> References: <87zj08zvcl.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zg1uq-0008DC-5S for emacs-orgmode@gnu.org; Sat, 26 Sep 2015 22:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zg1um-0007yj-W1 for emacs-orgmode@gnu.org; Sat, 26 Sep 2015 22:42:16 -0400 Received: from plane.gmane.org ([80.91.229.3]:33419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zg1um-0007yS-PH for emacs-orgmode@gnu.org; Sat, 26 Sep 2015 22:42:12 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zg1ug-0001v1-EC for emacs-orgmode@gnu.org; Sun, 27 Sep 2015 04:42:06 +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 ; Sun, 27 Sep 2015 04:42:06 +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 ; Sun, 27 Sep 2015 04:42:06 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 Thomas S. Dye writes: > Aloha Nick, > > Nick Dokos 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 -- Nick