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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>
Subject: bug#44698: closed (Re: bug#44698: 27.1; dir-locals.el stay on
 file-local-variables-alist when using vc-mode)
Date: Sat, 08 Mar 2025 09:12:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#44698: 27.1; dir-locals.el stay on file-local-variables-alist when using vc-mode

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 44698 <at> debbugs.gnu.org.

-- 
44698: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44698
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Christopher Lemmer Webber <cwebber <at> dustycloud.org>,
 Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>,
 44698-done <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#44698: 27.1; dir-locals.el stay on
 file-local-variables-alist when using vc-mode
Date: Sat, 08 Mar 2025 17:11:26 +0800
Hello,

On Sat 08 Mar 2025 at 08:07am GMT, Stefan Kangas wrote:

> I think you can use `kill-all-local-variables` for this:
>
>     (kill-all-local-variables 'kill-permanent)

Oh, thanks, I never knew it could take an argument.
I think the thing to do here then is add that to vc-log-internal-common.
We're a long way from releasing Emacs 31 so if this does break something
else, we'll find out.

Installed the change and closing the bug.

-- 
Sean Whitton

[Message part 3 (message/rfc822, inline)]
From: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Christopher Lemmer Webber <cwebber <at> dustycloud.org>
Subject: 27.1; dir-locals.el stay on file-local-variables-alist when using
 vc-mode
Date: Mon, 16 Nov 2020 21:30:43 +0100
[Message part 4 (text/plain, inline)]
Hi,

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")))))

[reproducer.sh (application/x-sh, attachment)]

This bug report was last modified 135 days ago.

Previous Next


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