From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: file local variables Date: Tue, 15 Dec 2009 02:20:00 +0200 Organization: JURTA Message-ID: <87k4wpyrbv.fsf@mail.jurta.org> References: <87ljh59r3w.fsf@mail.jurta.org> <87ljh53z37.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260839672 1011 80.91.229.12 (15 Dec 2009 01:14:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Dec 2009 01:14:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 15 02:14:25 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NKLzd-0004nh-9s for ged-emacs-devel@m.gmane.org; Tue, 15 Dec 2009 02:14:25 +0100 Original-Received: from localhost ([127.0.0.1]:55080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKLzc-0002jF-Ob for ged-emacs-devel@m.gmane.org; Mon, 14 Dec 2009 20:14:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKLzV-0002iD-E2 for emacs-devel@gnu.org; Mon, 14 Dec 2009 20:14:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKLzQ-0002fu-JW for emacs-devel@gnu.org; Mon, 14 Dec 2009 20:14:16 -0500 Original-Received: from [199.232.76.173] (port=56327 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKLzQ-0002fb-Fh for emacs-devel@gnu.org; Mon, 14 Dec 2009 20:14:12 -0500 Original-Received: from smtp-out3.starman.ee ([85.253.0.5]:57639 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKLzQ-0008PL-6X for emacs-devel@gnu.org; Mon, 14 Dec 2009 20:14:12 -0500 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.94.164.cable.starman.ee [82.131.94.164]) by mx1.starman.ee (Postfix) with ESMTP id 71CBF3F40D5 for ; Tue, 15 Dec 2009 03:14:05 +0200 (EET) In-Reply-To: <87ljh53z37.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 15 Dec 2009 01:39:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118629 Archived-At: >> BTW, while looking at this bug, I noticed a security hole in using >> duplicate file local variables. >> >> `hack-local-variables-filter' checks for the safety the value of the *last* >> duplicate local variable in the list (the first in the reversed list), but >> `hack-local-variables' uses an unchecked value of the *first* duplicate >> local variable. > > Hopefully, this is a false alarm. I can't find a recipe to reproduce this. Sometimes it's even more safe than necessary. When .dir-locals.el contains a variable with an unsafe value, but file-local variables contain a safe value of the same variable, it asks confirmation for the unsafe directory-local value, but really uses the safe file-local variable's value. I think this is not a problem. It seems better to remind the user that .dir-locals.el contains an unsafe value. -- Juri Linkov http://www.jurta.org/emacs/