From: Michael Heerdegen <michael_heerdegen@web.de>
To: 17205@debbugs.gnu.org
Subject: bug#17205: 24.3.50; dired and directory variables
Date: Sun, 06 Apr 2014 14:55:19 +0200 [thread overview]
Message-ID: <877g72d3d4.fsf@web.de> (raw)
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)
next reply other threads:[~2014-04-06 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-06 12:55 Michael Heerdegen [this message]
2021-01-23 22:12 ` bug#17205: 24.3.50; dired and directory variables Lars Ingebrigtsen
2021-01-24 19:37 ` Michael Heerdegen
2021-01-25 12:50 ` Michael Heerdegen
2021-01-26 0:14 ` Lars Ingebrigtsen
2021-01-26 12:22 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877g72d3d4.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=17205@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.