From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Francesco =?UTF-8?Q?Potort=C3=AC?= Newsgroups: gmane.emacs.bugs Subject: bug#27066: 25.1; dired unsafe variables Date: Thu, 25 May 2017 18:58:11 +0200 Message-ID: References: <83k255klmy.fsf@gnu.org> <83efvcly3q.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: blaine.gmane.org 1495732130 29424 195.159.176.226 (25 May 2017 17:08:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 May 2017 17:08:50 +0000 (UTC) Cc: 27066@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 25 19:08:45 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dDwFc-0007PA-Sk for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 May 2017 19:08:40 +0200 Original-Received: from localhost ([::1]:32914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDwFg-00016t-Pl for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 May 2017 13:08:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDw6L-0007qU-LT for bug-gnu-emacs@gnu.org; Thu, 25 May 2017 12:59:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDw6I-00055k-GR for bug-gnu-emacs@gnu.org; Thu, 25 May 2017 12:59:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dDw6I-00055g-Dg for bug-gnu-emacs@gnu.org; Thu, 25 May 2017 12:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dDw6H-0006Ql-Q0 for bug-gnu-emacs@gnu.org; Thu, 25 May 2017 12:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 May 2017 16:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27066 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27066-submit@debbugs.gnu.org id=B27066.149573149624667 (code B ref 27066); Thu, 25 May 2017 16:59:01 +0000 Original-Received: (at 27066) by debbugs.gnu.org; 25 May 2017 16:58:16 +0000 Original-Received: from localhost ([127.0.0.1]:37934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDw5Y-0006Pn-3e for submit@debbugs.gnu.org; Thu, 25 May 2017 12:58:16 -0400 Original-Received: from mx-all.isti.cnr.it ([194.119.192.3]:48571 helo=blade3.isti.cnr.it) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDw5W-0006Pe-0U for 27066@debbugs.gnu.org; Thu, 25 May 2017 12:58:14 -0400 Original-Received: from tucano.isti.cnr.it ([146.48.81.102]) by mx-all.isti.cnr.it (PMDF V6.5-x6 #1609) with ESMTPSA id <01QERO9ZPBLCCZ8JCI@mx-all.isti.cnr.it> for 27066@debbugs.gnu.org; Thu, 25 May 2017 18:56:48 +0200 (MEST) Original-Received: from pot by tucano.isti.cnr.it with local (Exim 4.89) (envelope-from ) id 1dDw5T-0000pQ-Rk; Thu, 25 May 2017 18:58:11 +0200 In-reply-to: <83efvcly3q.fsf@gnu.org> X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132846 Archived-At: >> Date: Thu, 25 May 2017 17:54:50 +0200 >> From: Francesco Potortì >> Cc: 27066@debbugs.gnu.org >> >> >I'm not sure why this is deemed a bug: you have a .dir-locals.el file >> >in that directory, which specifies directory-local variables. What >> >exactly is the problem with the prompt? >> >> I have not created that file myself (downloaded the source code from >> Github), and before reading your answer I did not know about the >> existence of .dir-locals.el files which get loaded automatically. I >> can't find the "dir-local" string anywhere either in the Emacs or Elisp >> manuals. > >How did you search? Typing "i directory-local RET" lands me on the >right place, as does "C-s dir-local" followed by C-s enough times. Hm. It turns out that Debian, for some reason, did not update my dir info file after installing emacs25 side-by-side with emacs22, so I was reading emacs22 docs. Sorry for the inaccurate info. >> Moreover the warning message does not mention .dir-locals.el >> anywhere. >> >> So first, there is a documentation problem about the .dir-locals.el >> files. > >Please suggest how to improve the existing docs. The warning message should not say that risky variables are present in the directory: that makes sense only if you know where to look. When reading that message, I thought about some bug somewhere. The warning message should name the file where the offending variables were found, instead. >> Second, probably dired should prompt *before* ever loading that file and >> parse it only if the user agrees. Am I too conservative? > >I think you are too conservative. We treat directory-local variables >like we treat file-local variables: as soon as you visit the >file/directory, the variables are interpreted. > >Perhaps we should offer an option to ask the question you mentioned, >but I think in general it will annoy too much. I don't know. It's a relatively recent innovation, and I bet very few users have ever stumbled into it. In my opinion, dired should warn the user and ask for permission to go on whenever it wants to read a .dir-locals.el file. Probably a customisation variable could avoid this prompt. And maybe in the future the current behaviour could become the default, but not now.