unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Landell <david.landell@sunnyhill.email>
To: 54405@debbugs.gnu.org
Subject: bug#54405: 27.1; How to reset connection-local variable
Date: Thu, 17 Mar 2022 16:02:39 +0100	[thread overview]
Message-ID: <861qz0d3lc.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87y219iw3l.fsf@gmx.de>

Thanks Michael for the answer,

Michael Albinus <michael.albinus@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.






  reply	other threads:[~2022-03-17 15:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 20:44 bug#54405: 27.1; How to reset connection-local variable David Landell
2022-03-16 18:35 ` Michael Albinus
2022-03-17 15:02   ` David Landell [this message]
2022-03-18  7:23     ` Michael Albinus
2022-03-18 11:38       ` Michael Albinus
2022-03-18 16:57         ` David Landell
2022-03-19  8:24           ` Michael Albinus
2022-03-19 15:57             ` Drew Adams
2022-03-19 17:57               ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=861qz0d3lc.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me \
    --to=david.landell@sunnyhill.email \
    --cc=54405@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).