From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jidanni@jidanni.org Newsgroups: gmane.emacs.help Subject: Re: how to reference the current *.el file in elisp Date: Tue, 30 Jun 2009 09:29:43 +0800 Organization: Datemas.de http://news.datemas.de Message-ID: <87eit2zeyg.fsf@jidanni.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246339305 26280 80.91.229.12 (30 Jun 2009 05:21:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Jun 2009 05:21:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 30 07:21:38 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MLVmj-00039N-RX for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jun 2009 07:21:38 +0200 Original-Received: from localhost ([127.0.0.1]:41549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLVmi-0005nH-Vd for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jun 2009 01:21:37 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed2.telusplanet.net!newsfeed.telus.net!feeder.erje.net!newsfeed.datemas.de!news.datemas.de!jidanni1.jidanni.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-X-Trace: news.datemas.de z51R+5LDpJK1pseiXTOW8ZzryZg1bUluDLzKGJhRZbKAd1QCKYF9eGBgNwXx/NpdKY2ly9aVuvaC1TR2sQSI8xIRA1fVS1L8kXPOs+vt/07t3eu1zb8NBDghr3L1zoVUmbgYv3b+xBAI5724q3UfhQPY5sACL6yV Original-X-Complaints-To: abuse@datemas.de Original-NNTP-Posting-Date: Tue, 30 Jun 2009 01:29:50 +0000 (UTC) Original-Xref: news.stanford.edu gnu.emacs.help:170443 X-Mailman-Approved-At: Tue, 30 Jun 2009 00:58:27 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65663 Archived-At: > 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