From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Unsafe file variables... Date: 05 Apr 2004 04:25:47 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1081125060 26925 80.91.224.253 (5 Apr 2004 00:31:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Apr 2004 00:31:00 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 05 02:30:54 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BAI0s-0007zG-00 for ; Mon, 05 Apr 2004 02:30:54 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BAI0r-0004MG-00 for ; Mon, 05 Apr 2004 02:30:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BAHyk-0004Tx-Jg for emacs-devel@quimby.gnus.org; Sun, 04 Apr 2004 20:28:42 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BAHxv-0004MG-Ua for emacs-devel@gnu.org; Sun, 04 Apr 2004 20:27:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BAHxL-0003vI-Us for emacs-devel@gnu.org; Sun, 04 Apr 2004 20:27:47 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BAHwG-0002rQ-Ly; Sun, 04 Apr 2004 20:26:08 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id 102675EE03D; Mon, 5 Apr 2004 02:26:07 +0200 (CEST) Original-To: rms@gnu.org In-Reply-To: Original-Lines: 49 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21261 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21261 storm@cua.dk (Kim F. Storm) writes: > David Kastrup writes: > > > Ok, I have had an idea which might be stupid or not. And it might > > also have political implications which I am too stupid to see. I just > > want to put it out. > > > > Emacs warns about potentially unsafe file variables and stuff, like > > > > ;;; Local variables: > > ;;; eval: (put 'preview-defmacro 'lisp-indent-function 'defun) > > ;;; end: > > > > Now it is a nuisance to get this question each time, and it is not > > feasible to disable the question permanently due to security reasons. > > There is already a simple solution to this in CVS emacs: > > Just add it to safe-local-eval-forms (e.g. via customize). I just checked that this _is_ documented in NEWS, but it is also marked so that is NOT added to the emacs manual (---). IMO, this is a very useful feature which should not be hidden to users. What about adding this to custom.texi: *** custom.texi 02 Nov 2003 08:01:02 +0100 1.60 --- custom.texi 05 Apr 2004 04:23:05 +0200 *************** *** 1060,1065 **** --- 1060,1071 ---- neither @code{t} nor @code{nil}, so normally Emacs does ask for confirmation about file settings for these variables. + @findex safe-local-eval-forms + The @code{safe-local-eval-forms} is a customizable list of eval + forms which are safe to eval, so Emacs should not ask for + confirmation to evaluate these forms, even if + @code{enable-local-variables} says to ask for confirmation in general. + @node Key Bindings @section Customizing Key Bindings @cindex key bindings -- Kim F. Storm http://www.cua.dk