GNU bug report logs - #17205
24.3.50; dired and directory variables

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Michael Heerdegen <michael_heerdegen@HIDDEN>; dated Sun, 6 Apr 2014 12:56:05 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Apr 2014 12:55:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 06 08:55:59 2014
Received: from localhost ([127.0.0.1]:37506 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WWmc8-0004nM-Li
	for submit <at> debbugs.gnu.org; Sun, 06 Apr 2014 08:55:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53433)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1WWmc4-0004n7-DD
 for submit <at> debbugs.gnu.org; Sun, 06 Apr 2014 08:55:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1WWmbw-0004lj-KC
 for submit <at> debbugs.gnu.org; Sun, 06 Apr 2014 08:55:51 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59746)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1WWmbw-0004lf-Gq
 for submit <at> debbugs.gnu.org; Sun, 06 Apr 2014 08:55:44 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55135)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1WWmbq-0001cB-7i
 for bug-gnu-emacs@HIDDEN; Sun, 06 Apr 2014 08:55:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1WWmbh-0004iR-0w
 for bug-gnu-emacs@HIDDEN; Sun, 06 Apr 2014 08:55:38 -0400
Received: from mout.web.de ([212.227.15.4]:49646)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1WWmbg-0004iC-Nr
 for bug-gnu-emacs@HIDDEN; Sun, 06 Apr 2014 08:55:28 -0400
Received: from drachen.dragon ([90.186.47.182]) by smtp.web.de (mrweb103) with
 ESMTPSA (Nemesis) id 0LxOHm-1X4RKp2G7O-016tDp for
 <bug-gnu-emacs@HIDDEN>; Sun, 06 Apr 2014 14:55:26 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; dired and directory variables
Date: Sun, 06 Apr 2014 14:55:19 +0200
Message-ID: <877g72d3d4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K0:CQC7Mkca1QJYbMASXP1J4AG2OkUxZtXlTt/qi5FLYflvX1w8pDo
 ouOROg8hCWkpM33JeV7mEAJgpgorXyE1a9Y3OYQE5HvmL5APvWSv9Pt1BugLlJPY4e5tWF2
 de8hILdfU+5CodKJJIYBRQYz6Y1cI17XkUk/fKPUqxL6P8XQKFTmprYmuJNApJo2FdTOrKE
 dvdxJnXqujJRl8HsufqBg==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)


Hello,

dired doesn't play well with directory local variables.  The manual
(info "(emacs) Directory Variables") seems to say that they would work
with dired, but I found several problems with that (all this in emacs
-Q):


1.  In dired, they (sometimes?) take effect only in subdirectories, but
not in the directory where they are specified.

Example:  In my ~, I create a .dir-locals.el with the content

((nil . ((a .  "hallo"))))

When I now open a dired buffer of ~, `a' is undefined.  When I open any
file below ~, `a' is bound as expected.


2.  Being able to use use `dired-listing-switches' as a directory
variable would obviously be very useful.  But it has no effect, even not
in subdirectories.  OTOH, using `dired-actual-switches' has an effect,
it leads to a sorting as expected, even (contrary to 1.) in the
directory that contains the dir locals file.


3.  `dir-locals-collect-variables' "destroys" any (subdirs . nil)
specification:

I change the .dir-locals.el in my ~ to the following content:

((nil . ((a .  "hallo")
         (subdirs . nil))))

and restart Emacs.

Now I dired ~.  After that, I visit any file somewhere under ~ (this can
be a regular file or a directory).  `a' will be bound in that buffer.

This doesn't happen if I don't dired ~ before.  The cause seems to be
this line in `dir-locals-collect-variables':

  (setq alist (delq subdirs alist))

which modifies the cached alist sturcture destructively (permanently!).
The `delq' should be a `remq', I guess.


Many thanks,

Michael.



In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-28 on drachen
Windowing system distributor `The X.Org Foundation', version 11.0.11500000
System Description:	Debian GNU/Linux testing (jessie)





Acknowledgement sent to Michael Heerdegen <michael_heerdegen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#17205; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.