From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Landell Newsgroups: gmane.emacs.bugs Subject: bug#54405: 27.1; How to reset connection-local variable Date: Thu, 17 Mar 2022 16:02:39 +0100 Message-ID: <861qz0d3lc.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> References: <867d8vc5dq.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> <87y219iw3l.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33540"; mail-complaints-to="usenet@ciao.gmane.io" To: 54405@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 17 16:04:22 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nUrfq-0008Xz-OR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Mar 2022 16:04:22 +0100 Original-Received: from localhost ([::1]:45632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nUrfp-0005Ki-JC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Mar 2022 11:04:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUrfX-0005JB-26 for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2022 11:04:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nUrfW-0006ke-FY for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2022 11:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nUrfW-0000iy-78 for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2022 11:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Landell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Mar 2022 15:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54405 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 54405-submit@debbugs.gnu.org id=B54405.16475293862716 (code B ref 54405); Thu, 17 Mar 2022 15:04:02 +0000 Original-Received: (at 54405) by debbugs.gnu.org; 17 Mar 2022 15:03:06 +0000 Original-Received: from localhost ([127.0.0.1]:54960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUreb-0000hj-W6 for submit@debbugs.gnu.org; Thu, 17 Mar 2022 11:03:06 -0400 Original-Received: from mailtransmit04.runbox.com ([185.226.149.37]:59750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUrea-0000hB-3M for 54405@debbugs.gnu.org; Thu, 17 Mar 2022 11:03:04 -0400 Original-Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1nUreT-00GQVi-AK for 54405@debbugs.gnu.org; Thu, 17 Mar 2022 16:02:57 +0100 Original-Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1nUreS-00082Q-Q3 for 54405@debbugs.gnu.org; Thu, 17 Mar 2022 16:02:57 +0100 Original-Received: by submission02.runbox with esmtpsa [Authenticated ID (666394)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1nUreH-0004xd-KU for 54405@debbugs.gnu.org; Thu, 17 Mar 2022 16:02:45 +0100 In-Reply-To: <87y219iw3l.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:228486 Archived-At: Thanks Michael for the answer, Michael Albinus 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.