From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28807: 25.2; dired-actual-switches` and .dir-locals.el Date: Fri, 13 Oct 2017 12:09:09 +0300 Message-ID: <83wp3zjtxm.fsf@gnu.org> References: <2681E59F-31EA-45BF-A6CF-A9486B4FE12D@halloleo.hailmail.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507885872 13357 195.159.176.226 (13 Oct 2017 09:11:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2017 09:11:12 +0000 (UTC) Cc: 28807@debbugs.gnu.org To: leo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 13 11:11:08 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 1e2vzk-0002dp-7a for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Oct 2017 11:11:04 +0200 Original-Received: from localhost ([::1]:49124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2vzr-0005ad-Ix for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Oct 2017 05:11:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2vyn-0004oo-VY for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 05:10:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2vyk-00033c-MR for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 05:10:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56421) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2vyk-00033F-J7 for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 05:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2vyk-0007ic-Bf for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 05:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Oct 2017 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28807 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28807-submit@debbugs.gnu.org id=B28807.150788577029611 (code B ref 28807); Fri, 13 Oct 2017 09:10:02 +0000 Original-Received: (at 28807) by debbugs.gnu.org; 13 Oct 2017 09:09:30 +0000 Original-Received: from localhost ([127.0.0.1]:36869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2vyE-0007hX-9U for submit@debbugs.gnu.org; Fri, 13 Oct 2017 05:09:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2vyC-0007hJ-AD for 28807@debbugs.gnu.org; Fri, 13 Oct 2017 05:09:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2vy3-00025z-Sh for 28807@debbugs.gnu.org; Fri, 13 Oct 2017 05:09:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2vy3-00025e-Pv; Fri, 13 Oct 2017 05:09:19 -0400 Original-Received: from [176.228.60.248] (port=1289 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e2vy2-0008LX-1Q; Fri, 13 Oct 2017 05:09:19 -0400 In-reply-to: <2681E59F-31EA-45BF-A6CF-A9486B4FE12D@halloleo.hailmail.net> (message from leo on Fri, 13 Oct 2017 19:16:08 +1100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:138332 Archived-At: > From: leo > Date: Fri, 13 Oct 2017 19:16:08 +1100 > > ;;; Directory Local Variables > ;;; For more information see (info "(emacs) Directory Variables") > > ((dired-mode . > ((dired-actual-switches . "-laht") > (subdirs . nil)))) > > * Create a subirectory `subdir` inside `mydir` > * Create some files with different timestamp and different names in there. > > Bug 1: .dir-locals.el not applied the first time > ================================================ > > * Launch `emacs -Q` > * Open `mydir` via `M-x find-file` as a dired buffer > * Observe that `mydir` is **not** in date order sorted > * Kill `mydir` buffer. > * Open again `mydir` via `M-x find-file` as a dired buffer > * Observe that `mydir` **is** in date order sorted (as it should be) > > Bug 2: (subdirs . nil) rule not obeyed > ====================================== > > * Stay in that `emacs -Q` session > * Kill `mydir` buffer. > * Open `mydir/subdir` via `M-x find-file` as a dired buffer > * Observe that `mydir` **is** in date order sorted (as it **not** should be) I think this is because both settings take their effect before the Dired mode is turned on in the buffer. IOW, these customizations simply cannot have the desired effect, as they are conditioned on the wrong condition.