* bug#8095: dir-locals-directory-cache confusion
@ 2011-02-22 8:31 Glenn Morris
2011-02-24 8:58 ` Glenn Morris
0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2011-02-22 8:31 UTC (permalink / raw)
To: 8095
Package: emacs
Version: 23.2.94
There is some weirdness going on with caching of dir-locals files:
mkdir foo
cat <<EOF > foo/.dir-locals.el
((nil . ((sentence-end-double-space . t))))
EOF
emacs -q foo/.dir-locals.el
C-h v sentence-end-double-space
This variable is a directory local variable
from the file "/home/gm/tmp/foo/".
^^^^^^^^^^^^^^^^^^^^^^^
That's a directory, not a file. Then do:
M-: (setq dir-locals-directory-cache nil)
and repeat:
C-h v sentence-end-double-space
This variable is a directory local variable
from the file "/home/gm/tmp/foo/.dir-locals.el".
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OK, now it's a directory.
Analysis: dir-locals-find-file is either going to return a file (if it
did not find a matching entry in the cache), or a directory (if it did
find an entry in the cache).
Further comment: This line in dir-locals-find-file
(equal (nth 2 dir-elt)
(nth 5 (file-attributes (car dir-elt))))
compares the mtime element from the cache with the current mtime of the
*directory*. The mtime element in the cache is set by
dir-locals-read-from-file and is the mtime of the *file*.
So in summary there is some confusion between directory and files that
messes up the caching. The whole thing should be consistent about
whether it wants to refer to directories or files.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#8095: dir-locals-directory-cache confusion
2011-02-22 8:31 bug#8095: dir-locals-directory-cache confusion Glenn Morris
@ 2011-02-24 8:58 ` Glenn Morris
2011-02-24 14:47 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2011-02-24 8:58 UTC (permalink / raw)
To: 8095-done
Version: 24.1
I believe I fixed this mess in the trunk.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#8095: dir-locals-directory-cache confusion
2011-02-24 8:58 ` Glenn Morris
@ 2011-02-24 14:47 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2011-02-24 14:47 UTC (permalink / raw)
To: 8095
> I believe I fixed this mess in the trunk.
Thank you,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-24 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22 8:31 bug#8095: dir-locals-directory-cache confusion Glenn Morris
2011-02-24 8:58 ` Glenn Morris
2011-02-24 14:47 ` Stefan Monnier
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.