From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: mark .dir-locals.el buffer or file as safe instead of variables as safe Date: Wed, 27 Jun 2018 16:24:24 +1200 Message-ID: <037e51edfe70cb450157d1fb6f0ace0d@webmail.orcon.net.nz> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1530073356 16701 195.159.176.226 (27 Jun 2018 04:22:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2018 04:22:36 +0000 (UTC) User-Agent: Orcon Webmail Cc: Emacs-devel , emacs-devel@gnu.org To: cdelia@dc.uba.ar Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 27 06:22:32 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fY1yR-0004GW-Bd for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 06:22:31 +0200 Original-Received: from localhost ([::1]:56452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY20Y-0002Gj-PV for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 00:24:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY20R-0002GY-Ua for emacs-devel@gnu.org; Wed, 27 Jun 2018 00:24:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fY20O-0005aN-0U for emacs-devel@gnu.org; Wed, 27 Jun 2018 00:24:35 -0400 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:40806) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fY20N-0005Ta-Lm; Wed, 27 Jun 2018 00:24:31 -0400 Original-Received: from [10.253.37.70] (port=57692 helo=webmail.orcon.net.nz) by smtp-1.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1fY20G-0007CG-Nc; Wed, 27 Jun 2018 16:24:25 +1200 Original-Received: from wlgwil-nat-office.catalyst.net.nz ([202.78.240.7]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Wed, 27 Jun 2018 16:24:24 +1200 In-Reply-To: X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 60.234.4.34 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226758 Archived-At: On 2018-06-27 12:14, cdelia@dc.uba.ar wrote: > So, if a mark foo-variable, on trusted land to get rid of confirmation > and just happen to open something on hell itself, by accident or > glory, instead of a peak of dark magic knowledge I could let all hell > break lose. The trust is not for a variable regardless of its value; it is for a *specific value* of a variable. If "hell itself" wanted to set the *same* value that was confirmed on "trusted land" then Emacs will be happy with that; but if a different value is used then the user will be prompted to confirm (or not) the new value as trusted. A variable can be defined to be a "safe-local-variable" such that a specified predicate function can validate file-local values, and automatically trust valid values without bothering the user. Otherwise the user needs to confirm each distinct value independently. -Phil