From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#54405: 27.1; How to reset connection-local variable Date: Fri, 18 Mar 2022 12:38:05 +0100 Message-ID: <87h77vij8i.fsf@gmx.de> References: <867d8vc5dq.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> <87y219iw3l.fsf@gmx.de> <861qz0d3lc.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> <87lex7iv1n.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35412"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 54405@debbugs.gnu.org To: David Landell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 18 12:39:25 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 1nVAx3-00092m-6N for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 12:39:25 +0100 Original-Received: from localhost ([::1]:52952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVAx1-0002YR-G0 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 07:39:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVAwg-0002Y3-EC for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 07:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVAwg-0000KX-5s for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 07:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVAwf-0007zL-Vi for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 07:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Mar 2022 11:39:01 +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.164760349930653 (code B ref 54405); Fri, 18 Mar 2022 11:39:01 +0000 Original-Received: (at 54405) by debbugs.gnu.org; 18 Mar 2022 11:38:19 +0000 Original-Received: from localhost ([127.0.0.1]:56428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVAvy-0007yK-TJ for submit@debbugs.gnu.org; Fri, 18 Mar 2022 07:38:19 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:56723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVAvx-0007y5-6n for 54405@debbugs.gnu.org; Fri, 18 Mar 2022 07:38:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647603490; bh=+OSu8Cfqmvn0V6SUBC3GcsLAerDDG710C1Kqv+EnYMo=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=F5F2bT3CgTqzsN1hyyjvPVc8Uhb3O35Lmgq3wnpYVLZmZuTKvcyoI8RcHExDWw46g W6vXGHLiUr3S2UG0DwQzdH1NDQwBviJe6AkomJ06xyShIi0cIXO1QmPEegVon3eA3p jbVI0iIWfucQgWsSwk1is6VDduOU0cP0Jbc3ygEc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.148.52]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N9dwd-1o7zjo0g5N-015Vui; Fri, 18 Mar 2022 12:38:09 +0100 In-Reply-To: <87lex7iv1n.fsf@gmx.de> (Michael Albinus's message of "Fri, 18 Mar 2022 08:23:00 +0100") X-Provags-ID: V03:K1:zn1JXBkTZ9PtlUtWfHGgabFnDfppffX3nrJya6/touqJk80ejwV 0MjzWumUZBCVn9yeSrW/modU+yniOaXB3ibQNvsAhECBISjlcLEu+Tojk8GV/YnG8hJD/kR RAOTlKJZRpc2Btb+f0si2ZcEMRiHtLAQ7UlyZc0IiCSjck9ESQB4M71X34Vma1EdpkrFCXT 7fh0fcY+AS3pLHZ2tlNiw== X-UI-Out-Filterresults: notjunk:1;V03:K0:brLKSBos5Lw=:aSpPLvMsNwMCwEz8dP5nbp pn7b5bW6xCVwZ2pNOzMZrLiX2odzKsADdyuzaag5i5sL1/8Pr/FRDIr1su4my8XiEUzLp1Kaq N+BlQ+SltVc+wSgQkBHzr/fUkt3z6UwJra66h8i2iPsj9Xb5RNA74UPL2Eam+3J2zXcUoicYi 7+kwV6RA/sI39jPd79s4zGPa0DjTVJhAoOVlgkWQuoNr0vLKNAARhKAF545L9T1ob1N8Cr+p5 GC7ITVaAdFMntDAcRag+Mmh2zG1UOFxiqqBL472G1tTgrUFWxpLJdCOopnGp/s6o94/Q/0Hl2 6j0g/ewHsU3RmRoOKkGOZv6jIS/9QcOrNzGmm4AFUhtRX2cFTtDcIZ2MdBQhd7o4VZt5tPT57 38LowDLvnjIeTUm6EU66UwpVUGTUi/pbEy3ZTByPTfMbIcjSmIKZSFPUnZqUbLMhqX2/6dd/P /l1I/atGZQuMTVpLvv5ycsPDUQBymYzkM+0Uul3NEkA4+yNdgA+33ZOfROeATMFSdKe1meeVQ XEdOiYm9LpwHRYiKm0jsdFgFpIw6NztlL7OYbSh2QLc3INDd7+EN6euiK+m+QajRdwvTOqwhJ co6Wu+hT6L2xBjU9kyjMehJJeXEleRiCBsPHtejgwXHzjri12Zi39cvmwruhgZ1waZ7Lfhsj5 6iBtaDHmwCij4wg+pjjIjwqCRyThi2SV/pGVdYD3dcueEniQG2P+WNgcCmDn5XMn4nx05+cIF KP2NHlLbOb3rPz4QzejYXrarYgdG9SFZnial3I7lgojlfx1/sFUS1S8xwor4MYinqiJgxguJ 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:228542 Archived-At: Michael Albinus writes: Hi David, >> 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 :app= lication >> key. There is something there with 'tramp' being applied by default that >> I don't understand though. > > `with-connection-local-variables' calls > `connection-local-criteria-for-default-directory' w/o an APPLICATION > argument, that's why `tramp' is used by default. Perhaps we shall extend > `with-connection-local-variables' to accept another :application > key. But for the time being, you might copy > `with-connection-local-variables' into your own package under another > name, and modify it accordingly. 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 --8<---------------cut here---------------start------------->8--- -- Variable: connection-local-default-application The default application, a symbol, to be applied in =E2=80=98with-connection-local-variables=E2=80=99. It defaults to =E2= =80=98tramp=E2=80=99, but in case you want to overwrite Tramp=E2=80=99s settings temporarily, you c= ould let-bind it like (connection-local-set-profile-variables 'my-remote-perl '((perl-command-name . "/usr/local/bin/perl5") (perl-command-switch . "-e %s"))) (connection-local-set-profiles '(:application 'my-app :protocol "ssh" :machine "remotehost") 'my-remote-perl) (let ((default-directory "/ssh:remotehost:/working/dir/") (connection-local-default-application 'my-app)) (with-connection-local-variables do something useful)) This variable must not be changed globally. --8<---------------cut here---------------end--------------->8--- Does this suffice? >> /David Best regards, Michael.