GNU bug report logs - #44698
27.1; dir-locals.el stay on file-local-variables-alist when using vc-mode

Previous Next

Package: emacs;

Reported by: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>

Date: Mon, 16 Nov 2020 20:31:02 UTC

Severity: normal

Found in version 27.1

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


Message #18 received at 44698 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Christopher Lemmer Webber <cwebber <at> dustycloud.org>,
 GNU Debbugs <control <at> debbugs.gnu.org>,
 Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>,
 44698 <at> debbugs.gnu.org
Subject: Re: bug#44698: 27.1; dir-locals.el stay on
 file-local-variables-alist when using vc-mode
Date: Mon, 11 Jul 2022 11:22:33 -0400
unarchive 44698
thanks

Hi,

Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com> writes:
>
>> While using vc-mode, the dir-locals.el variables under 'nil' mode are
>> accumulated on file-local-variables-alist and they still apply after
>> exiting the scope of the file.  The attached script can be used to
>> reproduce it (Emacs 27.1, on GNU Guix
>> f6e031ab36fd99ad3536caabfdaefcc2b5f606a1).
>>
>> It generates a temporary folder with two example git repositories, an
>> offending dir-locals.el[1], launches an emacs with -Q and the shows
>> the steps to follow:
>>
>> 1. Open p1/file and accept the .dir-locals.el variables.
>> 2. Call vc-print-log
>> 3. Check the file-local-variables-alist
>> 4. Open p2/file (this one doesn't have .dir-locals.el).
>> 5. Call vc-print-log again, the message is shown again.
>>
>> Best regards,
>> Miguel
>>
>> [1] It contains: ((nil . ((eval (message "Eval called")))))
>
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> I tried to reproduce this with both Emacs 27.1 and Emacs 29, and I was
> unable to -- in step 5), there's no message, and p2/file does not have
> anything in file-local-variables-alist.
>
> Are you still seeing this problem in recent Emacs versions?

I tried the reproducer again on my side, and I can reproduce the issue
(that the file-local-variables-alist is leaked from p1/file to p2/file).

I'm thus reopening the ticket.

I used the current 'emacs' package from Guix to test, which is at
version 28.1.

Thanks!

Maxim




This bug report was last modified 134 days ago.

Previous Next


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