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 #13 received at 54405 <at> debbugs.gnu.org (full text, mbox):

From: David Landell <david.landell <at> sunnyhill.email>
To: 54405 <at> debbugs.gnu.org
Subject: Re: bug#54405: 27.1; How to reset connection-local variable
Date: Thu, 17 Mar 2022 16:02:39 +0100
Thanks Michael for the answer,

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

> There does not exist a dedicated function for resetting. What I
> recommend is to use the macro `with-connection-local-variables', which
> runs BODY with applied connection-local variables, and a cleanup to the
> previous state afterwards.
>

This solves my small demo test case but unfortunately it doesn't solve
the main use case I slightly described. In the latter case something
else is calling hack-connection-local-variables-apply outside of the
resetting macro. I think it's possibly from tramp since there is a
process running in the buffer on the remote host.

If I understand the criteria matching correctly, it matches only the
fields available so if I use only the :host key, an unrelated criteria
will match as long as it is using the same :host key, right?

So, seems I should use my own :application key but then I can't use
the resetting macro since that is not applying locals with a unique :application
key. There is something there with 'tramp' being applied by default that
I don't understand though.

Anyway, this is possible to work around now that I think I understand
it.

/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.