GNU bug report logs - #54405
27.1; How to reset connection-local variable

Previous Next

Package: emacs;

Reported by: David Landell <david.landell <at> sunnyhill.email>

Date: Tue, 15 Mar 2022 20:46:01 UTC

Severity: normal

Tags: moreinfo

Found in version 27.1

Fixed in version 29.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


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

From: David Landell <david.landell <at> sunnyhill.email>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 54405 <at> debbugs.gnu.org
Subject: Re: bug#54405: 27.1; How to reset connection-local variable
Date: Fri, 18 Mar 2022 17:57:06 +0100
Excellent,

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>
> I've pushed a change to the Emacs master git branch, which allows to
> change the application in `with-connection-local-variables'. The Elisp
> manual has been extended with
>
> Does this suffice?
>

This seems to work fine as far as I can tell and as far as my testing
goes with this feature isolated. There is however a small complication
which I don't know if it is to be considered a bug or not.

Still this fails with my package. I discovered that this is because
`hack-dir-local-variables-non-file-buffer' is called at some point for a
totally unrelated variable to be applied. The actual trigger point is
`hack-local-variables-apply'.

So further debugging indicates that the connection-local variable that
is applied (and reset) in `with-connection-local-variables' is also
added to `file-local-variables-alist' which makes it a buffer local
during the call to `hack-local-variables-apply'.

Question is if the file-local should be reset at the same time as
`kill-local-variable' is called in `with-connection-local-variables'?

Anyway, on my end this can be resolved, I have a workaround in place. So
this is mostly FYI.

Cheers,
David

>
> Best regards, Michael.




This bug report was last modified 3 years and 63 days ago.

Previous Next


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