Subject: Re: bug#46122: 25.2; changes to .dir-locals.el are not picked up when .dir-locals.el is a symlink

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 14 Jun 2022 15:01:59 +0200

Dan Connolly <[email-masked]> writes:

> 1. Create ~/projects/m/.dir-locals.el file to set tab-width to 4.
> 2. Visit ~/projects/m/xyz.c and verify that tabs use 4 spaces
> 3. mv ~/projects/m/.dir-locals.el to ~/.emacs.d/m-locals.el
> 4. ln -s ~/.emacs.d/m-locals.el ~/projects/m/.dir-locals.el
> 5. Change 4 6 in ~/.emacs.d/m-locals.el
> 6. in the xyz.c buffer, M-x revert-buffer
>
> expected result:
> 7. tabs use 6 spaces
>
> actual result:
> 7. no change; tabs still use 4 spaces
>
> work-around:
> (setq dir-locals-directory-cache nil) before step 6.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I've now fixed this in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no