emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: babel header arguments tutorial?
Date: Sat, 26 Sep 2015 22:41:57 -0400	[thread overview]
Message-ID: <87vbawziq2.fsf@pierrot.dokosmarshall.org> (raw)
In-Reply-To: m24migyf7e.fsf@tsdye.com

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

-- 
Nick

  reply	other threads:[~2015-09-27  2:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-26 18:39 babel header arguments tutorial? Lawrence Bottorff
2015-09-26 21:39 ` Charles C. Berry
2015-09-27  8:22   ` Modification dates in Worg (was: babel header arguments tutorial?) Michael Strey
2015-09-28 15:04     ` Ista Zahn
2015-09-29  8:06       ` Modification dates in Worg Michael Strey
2015-09-29 14:38         ` Ista Zahn
2015-09-26 22:09 ` babel header arguments tutorial? Nick Dokos
2015-09-26 22:43   ` Thomas S. Dye
2015-09-27  2:41     ` Nick Dokos [this message]
2015-09-27 16:28       ` Lawrence Bottorff
2015-09-27 19:51         ` Nick Dokos
2015-09-27 16:47       ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbawziq2.fsf@pierrot.dokosmarshall.org \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).