help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: how to reference the current *.el file in elisp


From: jidanni
Subject: Re: how to reference the current *.el file in elisp
Date: Tue, 30 Jun 2009 09:29:43 +0800

> How do I do things like
> # Local Variables:
> # compile-command: (concat "blarfowitz --nizbotize" buffer-file-name)
> # End:
> without being asked about risky variables, or hard wiring buffer-file-name?

BM> if you want to customize risky local variables, see the
BM> safe-local-variables-p function.

OK, I read that, and (info "(emacs) Safe File Variables")
but I still don't get why buffer-file-name is so unsafe... OK, maybe one
can set it to /etc/passwd and cause one to zap that file... Anyway, in
perl or sh there is the handy
       $PROGRAM_NAME
       $0      Contains the name of the program being executed.
So why in "Local Variables" stanzas is there no way to refer to the
current file being edited, without setting off all kinds of fire alarms,
or being forced to whitelist something because it is dangerous, thus
exposing myself to danger elsewhere. See also
http://groups.google.com/groups/search?as_umsgid=mailman.597.1244940108.2239.help-gnu-emacs@gnu.org


reply via email to

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