From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54405: 27.1; How to reset connection-local variable Resent-From: David Landell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Mar 2022 20:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54405 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 54405@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16473771228734 (code B ref -1); Tue, 15 Mar 2022 20:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Mar 2022 20:45:22 +0000 Received: from localhost ([127.0.0.1]:49688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUE2k-0002Go-97 for submit@debbugs.gnu.org; Tue, 15 Mar 2022 16:45:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:49332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUE2i-0002Gg-9d for submit@debbugs.gnu.org; Tue, 15 Mar 2022 16:45:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUE2h-0000xJ-Ta for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 16:45:20 -0400 Received: from mailtransmit05.runbox.com ([185.226.149.38]:49476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUE2f-00007p-Fc for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 16:45:19 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1nUE2X-00Bfy7-7a for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 21:45:09 +0100 Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1nUE2R-0003gH-Ik for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 21:45:03 +0100 Received: by submission01.runbox with esmtpsa [Authenticated ID (666394)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1nUE2L-0006Mn-A6 for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 21:44:57 +0100 From: David Landell Date: Tue, 15 Mar 2022 21:44:49 +0100 Message-ID: <867d8vc5dq.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.226.149.38; envelope-from=david.landell@sunnyhill.email; helo=mailtransmit05.runbox.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Hi, Is it possible to reset a connection local variable to the default in a buffer when default-directory changes from remote to local? I have attached an example ert test to demonstrate the issue. I would kind of expect the supplied code to work but I may be doing something wrong and there might be some other way of doing this. Couldn't find anything in the manual though. To run the code: emacs -Q -l ./connection-local.el The problem is a real world problem from my package rg.el (https://github.com/dajva/rg.el). It is similar to the grep.el package with the added possibility to rerun a searches with modified parameters from the results buffer. So a typical use case would be to do a search on a remote host and then change the default-directory in the results buffer to do the same search on the local computer. The connection local is used to store the path to the ripgrep executable that is driving the search. Best regards, David Landell --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=connection-local.el Content-Transfer-Encoding: quoted-printable Content-Description: Code to reproduce (require 'ert) (defvar connection-var 'local) (ert-deftest connection-locals-remote->local () ;; Setup connection locals for localhost (connection-local-set-profile-variables 'my-connection-profile '((connection-var . remote))) (connection-local-set-profiles '(:machine "localhost") 'my-connection-pro= file) (with-temp-buffer (setq default-directory (format "/sudo:%s@localhost:%s" (user-login-name) "/tmp")) (hack-connection-local-variables-apply (connection-local-criteria-for-default-directory)) (should (eq connection-var 'remote)) (setq default-directory "/tmp") (hack-connection-local-variables-apply (connection-local-criteria-for-default-directory)) (should (eq connection-var 'local)))) (ert t) --=-=-= Content-Type: text/plain In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19 built on lgw01-amd64-021 Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Linux Mint 20.2 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Ran 1 tests, 0 results were as expected, 1 unexpected Making completion list... Configured using: 'configure --build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp --program-suffix=27 --with-modules --with-file-notification=inotify --with-mailutils --with-harfbuzz --with-json --with-x=yes --with-x-toolkit=gtk3 --with-lcms2 --with-cairo --with-xpm=yes --with-gif=yes --with-gnutls=yes --with-jpeg=yes --with-png=yes --with-tiff=yes --with-xwidgets 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs27-bifpWT/emacs27-27.1~1.git86d8d76aa3=. -fstack-protector-strong -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie'' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LC_MONETARY: sv_SE.UTF-8 value of $LC_NUMERIC: sv_SE.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tramp-cache tramp-sh tramp tramp-loaddefs trampver tramp-integration tramp-compat shell pcomplete comint ansi-color ring parse-time iso8601 time-date ls-lisp format-spec auth-source cl-seq eieio eieio-core eieio-loaddefs password-cache json subr-x map files-x thingatpt cl-extra seq byte-opt bytecomp byte-compile cconv cl-macs gv ert pp ewoc debug backtrace help-mode easymenu find-func cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 76214 9618) (symbols 48 9041 1) (strings 32 26513 2007) (string-bytes 1 933622) (vectors 16 15642) (vector-slots 8 191670 10146) (floats 8 60 122) (intervals 56 347 0) (buffers 1000 15)) --=-=-=-- From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54405: 27.1; How to reset connection-local variable Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Mar 2022 18:36: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: To: David Landell Cc: 54405@debbugs.gnu.org Received: via spool by 54405-submit@debbugs.gnu.org id=B54405.16474557524255 (code B ref 54405); Wed, 16 Mar 2022 18:36:02 +0000 Received: (at 54405) by debbugs.gnu.org; 16 Mar 2022 18:35:52 +0000 Received: from localhost ([127.0.0.1]:52292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUYUy-00016Y-D0 for submit@debbugs.gnu.org; Wed, 16 Mar 2022 14:35:52 -0400 Received: from mout.gmx.net ([212.227.17.22]:40781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUYUw-00016L-Io for 54405@debbugs.gnu.org; Wed, 16 Mar 2022 14:35:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647455743; bh=ZZWDbNynFaL8Ra+6KCCEw4HiHMipg0TwHg7Hbzcj0JU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=PDQzgIeDROxFW/oHu5nC1tAi/5S4SdIbBuSbq34WgzLC0RQNDhVZxQN/slnsyhJ+F OAX9OQyY0qJLWUv4sZ+m1oS7uYyLKHB3G7Lt+i7gdrBlQu1RnRTMtSCPOkXISTBTC5 hPknH1yFSFWCRgnSUIcnXEBo+mfaS6LZLGHKbGG4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.124.64]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M59C8-1nVeQN0btU-0016GT; Wed, 16 Mar 2022 19:35:43 +0100 From: Michael Albinus References: <867d8vc5dq.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> Date: Wed, 16 Mar 2022 19:35:42 +0100 In-Reply-To: <867d8vc5dq.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> (David Landell's message of "Tue, 15 Mar 2022 21:44:49 +0100") Message-ID: <87y219iw3l.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:BEzYt4itne9e50LMkBIeu2u6XtWpezn+Avd/keD+RTW4ztWUNfH ALWM/EAEiQ5GmEGEs9eMf3cddptdIGx67VNDqq8N8hHquFtNXrss2K8U5useJzp8fDHR0xl nSQZ0Gf2mkIOQR/ozL134RhDGyMnNxxw5s8Y1Li4RC6h9ORVYWckImhjcKE7b1cywe/ssFJ SzjZgMPxEyIPrTlV8v3Vg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:KX/Qip3HbDs=:XM3wq1hBCVro56cV6HgTAe aeD+FOd5IS22dN3kqjayKEPTNqTrvOLZZMFscm1GDNWNj4gwK3/mc8GU0V4GBqoWBg4Bga9rJ mQSdc2lAW54RprV78DIBWyUoi2eoUNWWpexDc8BhZjCzPwYTlGCR87mjbTiARSHPrukGlOaD+ RDMPhSocgxBgRCXj0NOLtkZK5ALUNHzWfYv48USDghPVkmSl/MDgPFgpQiyDmVJ8Pyhfu0GWs Bs515GC6ExZglHCvyJOLdwyAYN+sFpYhx3nFXzYtaX9TXT630dUEK6uiMB4fOcc2XOGVR7CfE ghlivipzCMZ/Gf3TWO8bGDbNrIm3JunVMk1HUHTWHRGT5vMGKo7SP7oSzdkMzoF8/RBl9UEm6 gLgNfIjD7/mLRD94/5FzeIscDce69ByW4f0A0wk7e/gxzWOry/2PijBDD72/dx2oymYwI6MZf xBJHyZ9qB3GL/H5YJ8jIabyLFjIjuv68jeOVdyt53k9JeKvWrcWdnTmxDPMjLwAuc8SIWeSg1 KnUIs+UNcLUxZFdHvleI79LH+QqaJyPxPiudmwr25YJNQJGn8UNzRElB44sWOtTvZyBGnDelc ZXRIqmlkYyfRVCXBdxU/Rnqeu9zp1zskcbk+ozu5Zt/jgZbaMAR0RM1K9Dem4nbOMzeOOXJv6 LSiozBQYFeh767cXohe0rVmxsGPdC6JWpZKLGeppkvMyQGsRYyo2ImqHhderzc3g3Ordn2dl+ emWcQsGfkJJmUhGAuhxBGZ4E4WLNv1QTCHd21h0gaeTd/PCoNl9qxp0OpevDLdtxEdq/+PY/L RRpux411sEslYjkcLdlgq4CtDfu1sD1BUqaNmC87HtEd5F5r68dj9AvhntINA52x7m7fEMio8 oKTnh0624uYKv+eo6vqVQANZ0VLgOVv1YYcNjiXT+pOAbAwwIKwYWT4F4IB7Itqyfm8z26qjP I93G7q31R43bTYibTtBxfnCMcVpo1wdKFcWYSoEwU8wtI27XZgIexS8BFumZVwIHGjDgrTzqi 2bN9KblZUtUVV9ZJiNvuSCQ14jHCfsVbIE0O9onwe+nV9B6pOxVNAIJmov17THh9B6vLdCpf1 xWrSDdovoTyDMA= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) David Landell writes: > Hi, Hi David, > Is it possible to reset a connection local variable to the default > in a buffer when default-directory changes from remote to local? 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. > Best regards, > David Landell Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 17 07:05:48 2022 Received: (at control) by debbugs.gnu.org; 17 Mar 2022 11:05:48 +0000 Received: from localhost ([127.0.0.1]:53194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUnwy-0000F5-5B for submit@debbugs.gnu.org; Thu, 17 Mar 2022 07:05:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUnww-0000Er-G3 for control@debbugs.gnu.org; Thu, 17 Mar 2022 07:05:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MEjtq4xcnhz72xOJRRjhABi2g+GNUyMFEhxbR0uIlyA=; b=PSL685J2jRUfTWt6a8NwimOTF1 TbIhoIGT8f+WzmzwXhSJmOjihXR2HHj+95OiTnQ8Hx95hoPYHUmxSb+tqlYrP07eZffdGWheOcvrh +LTnoQ2MWil9u+AMDsSRD1SXWFFz39XgaRdOJuShb1lGGJHaXBfSlS7GhpvLOkmcJ5Rk=; Received: from 109.179.236.69.tmi.telenormobil.no ([109.179.236.69] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nUnwp-0006QU-8k for control@debbugs.gnu.org; Thu, 17 Mar 2022 12:05:41 +0100 Date: Thu, 17 Mar 2022 12:05:38 +0100 Message-Id: <871qz0vny5.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #54405 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 54405 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 54405 + moreinfo quit From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54405: 27.1; How to reset connection-local variable 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 To: 54405@debbugs.gnu.org Received: via spool by 54405-submit@debbugs.gnu.org id=B54405.16475293862716 (code B ref 54405); Thu, 17 Mar 2022 15:04:02 +0000 Received: (at 54405) by debbugs.gnu.org; 17 Mar 2022 15:03:06 +0000 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 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 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 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 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 From: David Landell In-Reply-To: <87y219iw3l.fsf@gmx.de> References: <867d8vc5dq.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> <87y219iw3l.fsf@gmx.de> Date: Thu, 17 Mar 2022 16:02:39 +0100 Message-ID: <861qz0d3lc.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54405: 27.1; How to reset connection-local variable Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Mar 2022 07:24: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 To: David Landell Cc: 54405@debbugs.gnu.org Received: via spool by 54405-submit@debbugs.gnu.org id=B54405.164758819127919 (code B ref 54405); Fri, 18 Mar 2022 07:24:01 +0000 Received: (at 54405) by debbugs.gnu.org; 18 Mar 2022 07:23:11 +0000 Received: from localhost ([127.0.0.1]:56117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nV6x4-0007GF-OP for submit@debbugs.gnu.org; Fri, 18 Mar 2022 03:23:10 -0400 Received: from mout.gmx.net ([212.227.17.22]:58477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nV6x3-0007G1-HA for 54405@debbugs.gnu.org; Fri, 18 Mar 2022 03:23:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647588181; bh=Yny67OaWQHeVlBzJgt9xZrVwph3jxkcU1zvEACskDGQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Slj0BhzBgaIhLsi5HfGM8Q7UV+PUL5tY3Ly3CvymKMUjaUVGn/Jx7yL7Oj889fCnC +8u990VqCCZ8ujQWprGoQE+eSAuD6q3A1snRd6+DnsUUTdU35n4VBnM1/iZIas44h/ 7NGNCyTVAn3o4yuHkDqumX19IfiWasZNYcZ6M7dM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.148.52]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3bX1-1oE6P017Jr-010fO4; Fri, 18 Mar 2022 08:23:01 +0100 From: Michael Albinus 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> Date: Fri, 18 Mar 2022 08:23:00 +0100 In-Reply-To: <861qz0d3lc.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> (David Landell's message of "Thu, 17 Mar 2022 16:02:39 +0100") Message-ID: <87lex7iv1n.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:udtjhI9WxofzeS0BobKDgTiXJoIFLQr41OWcfnQqilbnHAbSZMa 5g+yQAO2qZ56UeKbqOTsWB2igNvtG++gx9r7y79nulH0K+ccWOoB+/rkTJqwjLqBeawAhHj Z5zn7wMMkhVv+OMKc4E8VeD7Be2HZ/UWQAFTLbL22pOv0JjuqpLqSlMxrRMJXuad/GCOQkF 7zD5slhBrF0KT6nDAqc5A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:8vJnjFCXFPM=:eySPQClb/ks6uallK41je6 l58eYjTgZS9gI484/OFI+of05O3HDtiEKP11cUzFGV1af2t0B4Tg2x8cpIh0Sv8O/ZeXu7XKy +flEeN7+t49sgLB8tkEk82oHr699p+Nybr+KmqOLRhjT1VmjRX/w0RIEuTmrNnsyGL/Wz83de 5mzfDkpk6mRbVM2zyMtDfL29/CQWSfkG8TiU/+ECrsFxpLk2OPWsB1r2ILvpHEpNgk1WlCkSH edyroTv8Dh7esLMeveVlLbD1TWr2uh2afS7DoDv1JoLuWHsBcQrlFEYk2+2fGUiJGJzBdrr80 2HC4huwwPvE4kS7orKLil/jM6npu1mi4wIEF0mtdtH9yh5p4GdyTo4evvuk9T3W502+74aief suiG1FMhdUmRqMUT2x4/V1S9sYOlpIRb+KZFSrtErHYd3cVNk1+KQW3BU5utCsYYwjxu4Zy0z S4CGa/hbsCjBecuPWvj0wp4ztgTRZDdwxVqkvS8MRO207et4yB8YWLBJXDpUcGncQM2ndCj/e jJ/LtXZP6mHNx9QcoxmmUpGq+00Ihv/igg++620O1MsbVS+eJim48A7nNvZyhW1BukpwZz0as 9NWrluxJzvCNAXWdeVXkhbXNiNhyho8IWJBHLS9Fqm6ej0ER2XFBnGoducfgAjfniixMw7BwX oZP5gPTWtz75K3Qhqg5E1GImNd2C/uWRsZCAqqpBEL7WM2f4JuntjpHbLMY+FvI7za2qMDJXM huV4DcK4uaet/uePvAWjbkHLBOoODBBcayX249IT5mvOMokjbZ7qBlrzzKBwUlpnmvC0t+CVf RybBY17NG34m2J/Tf8s/qfWqlnLRPmUNQ2MOiiIrV752f/JtBCFqQmlageFZ1mKZj6cRWHFEW QXpXPg69B6TVhmQnQqCLS0PJi69nCUdB4gJeTPKpakaNOe/LPtk69AKmGMGnyRmDkpV+FikbY YziM8fMkhT9ZaQC4V0VqLRlo22653TaVJQ1NCVEKEMRLcMxTLOWxzUf77N6BtI5V4vcNzISMm /5Z8AZw2we5uM9wVUFzSQp2EH4FUDUp+bW4jmn7EW7cP87b6vqCAZNgAckVVRSCg6CTZHVGAs txWeqC++AsYlTw= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) David Landell writes: > Thanks Michael for the answer, Hi David, > 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. Yes, Tramp does this in its connection buffers. > 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? Yes. > 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. `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. > Anyway, this is possible to work around now that I think I understand > it. > > /David Best regards, Michael. From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54405: 27.1; How to reset connection-local variable 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 To: David Landell Cc: 54405@debbugs.gnu.org Received: via spool by 54405-submit@debbugs.gnu.org id=B54405.164760349930653 (code B ref 54405); Fri, 18 Mar 2022 11:39:01 +0000 Received: (at 54405) by debbugs.gnu.org; 18 Mar 2022 11:38:19 +0000 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 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 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 From: Michael Albinus 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> Date: Fri, 18 Mar 2022 12:38:05 +0100 In-Reply-To: <87lex7iv1n.fsf@gmx.de> (Michael Albinus's message of "Fri, 18 Mar 2022 08:23:00 +0100") Message-ID: <87h77vij8i.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:zn1JXBkTZ9PtlUtWfHGgabFnDfppffX3nrJya6/touqJk80ejwV 0MjzWumUZBCVn9yeSrW/modU+yniOaXB3ibQNvsAhECBISjlcLEu+Tojk8GV/YnG8hJD/kR RAOTlKJZRpc2Btb+f0si2ZcEMRiHtLAQ7UlyZc0IiCSjck9ESQB4M71X34Vma1EdpkrFCXT 7fh0fcY+AS3pLHZ2tlNiw== X-Spam-Flag: NO 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/sFUS1S8xwor4MYinqiJgxguJd hEKOIMS6V8HlA/G5d/Ob0FyGFr8HYWsVeBFDKHXwdsGgYC57DF92DrJC9l18Tv/Jz47XbVxxS OM5qbAPaKV7GFAW0rh9d5oe2xpJvuQ6glEu+9c1qVClupLzdmMRejIEK4A3n3KwH0Fc4ENfdx 9k4VsNWb3n5E6D5ZvEoCUxrsuuejI4rfPyOTVPg4cceJkgsTOriTFt0NtcsfBcNPDoCEd5NSh 6ew3+LDwGWYzZXufZ/u//mcuf4Ey+nNwZSfLcftL3uG9Y5rIsgFKiSA0I4AkjZBsPDPsCLdIZ TkKhUX0+PGOkm4= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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. From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54405: 27.1; How to reset connection-local variable Resent-From: David Landell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Mar 2022 16:58: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 To: Michael Albinus Cc: 54405@debbugs.gnu.org Received: via spool by 54405-submit@debbugs.gnu.org id=B54405.164762265810034 (code B ref 54405); Fri, 18 Mar 2022 16:58:02 +0000 Received: (at 54405) by debbugs.gnu.org; 18 Mar 2022 16:57:38 +0000 Received: from localhost ([127.0.0.1]:58241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVFv0-0002bl-Ck for submit@debbugs.gnu.org; Fri, 18 Mar 2022 12:57:38 -0400 Received: from mailtransmit04.runbox.com ([185.226.149.37]:41992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVFux-0002bU-9u for 54405@debbugs.gnu.org; Fri, 18 Mar 2022 12:57:37 -0400 Received: from mailtransmit03.runbox ([10.9.9.163] 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 1nVFuq-001Ylr-Gc for 54405@debbugs.gnu.org; Fri, 18 Mar 2022 17:57:28 +0100 Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1nVFup-0000D3-VJ; Fri, 18 Mar 2022 17:57:28 +0100 Received: by submission01.runbox with esmtpsa [Authenticated ID (666394)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1nVFua-0002Yv-1K; Fri, 18 Mar 2022 17:57:12 +0100 From: David Landell In-Reply-To: <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> <87h77vij8i.fsf@gmx.de> Date: Fri, 18 Mar 2022 17:57:06 +0100 Message-ID: <864k3vi4gt.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Excellent, > Michael Albinus 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. From unknown Thu Jun 19 16:24:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: David Landell Subject: bug#54405: closed (Re: bug#54405: 27.1; How to reset connection-local variable) Message-ID: References: <871qyye4er.fsf@gmx.de> <867d8vc5dq.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> X-Gnu-PR-Message: they-closed 54405 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: moreinfo Reply-To: 54405@debbugs.gnu.org Date: Sat, 19 Mar 2022 08:25:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1647678302-32537-1" This is a multi-part message in MIME format... ------------=_1647678302-32537-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #54405: 27.1; How to reset connection-local variable which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 54405@debbugs.gnu.org. --=20 54405: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54405 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1647678302-32537-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 54405-done) by debbugs.gnu.org; 19 Mar 2022 08:24:25 +0000 Received: from localhost ([127.0.0.1]:58951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVUNs-0008Rg-NY for submit@debbugs.gnu.org; Sat, 19 Mar 2022 04:24:24 -0400 Received: from mout.gmx.net ([212.227.17.21]:44319) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVUNq-0008RP-Fn for 54405-done@debbugs.gnu.org; Sat, 19 Mar 2022 04:24:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647678253; bh=xp13Vc95xFFAG3Hu8xlQmsSdIJ5yQ5GjZPC/wqcbHME=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Iv8N3WvVxsT+KFUA0Fh5ArqcxSTPvrhbyTCwB/54alBh1my2e+AIi6ungjgPUDQwY yIDwjxjtolXYA0lFbZpWgVsneY6UcpOzWR3ghCOPbZAoNkgqPHKTMkUHI1KLquX67W /Iw91N3k9MBNI/2404PASIWiGy3WN9WKPg3mOwuY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.159.32]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MYeR1-1naFLy1F11-00VkV4; Sat, 19 Mar 2022 09:24:13 +0100 From: Michael Albinus To: David Landell Subject: Re: bug#54405: 27.1; How to reset connection-local variable 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> <87h77vij8i.fsf@gmx.de> <864k3vi4gt.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 19 Mar 2022 09:24:12 +0100 In-Reply-To: <864k3vi4gt.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> (David Landell's message of "Fri, 18 Mar 2022 17:57:06 +0100") Message-ID: <871qyye4er.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:gXXeLWtnU7ckvemOev34NNtmok1+BenrfXkY2Ppnzd1yCx5IQUe QYDeUcz1sCRKfPr7j0R8KYVB/qCB6HmtXcuJhqCYxTCcCwPNhyfVhwmx1vd0sJTdSyEUAb+ 4grOZ57JFJ0ZbJg2F4Uk4kMpLl4+VoFOy5mdcHBslP85shI3cKKlBbnBx6sSA3SNALfjfDo o7HHOmcnmb8jGeTY2BO3g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3yLa4YES3sc=:ZB0tJYujCevj5IfXfE1pFk vm5DQxAtZpyCsTtCe1p+Rab8MSrX9J3qKr13RmXnu2e4LVGeWQYogtksGvTQkLHHHksXpdLNL 35XomZe3EKMe8W6Z2oWhm1rfnACvW1DAkGfBKOgnPB3bmpXJrX4gjNYPNFFSXXq45uenHxMiT qzG4bzPTZ/zIjgrk2rNnldwP9Ldj4xgLMdFpB4Nsubnyepd4s0qe4+UCRPe8KQssyifSP5gLO VM/jCSwDRcLJAdYZxnBn5e4av+Dvj5KGoxVpeB7ZoAzmxOXpkbqgyF2A96TH4bATU3Vne0XY8 lfq/slbEtMIFoYvg2MYrn4R6xpE1Sv0eiJNbFxz/QNd1+/4Bx5FbZzGbsi9cqVsqQMFr30qhE DZcYkJn+xMCWd81Wjsm9zwXo/kcQK2sXQS6rp3tlb/+aMKn6T2Hv/CdhNbLXu9OpQimgHTzwY ersWKeJ9RPt8Ckp+JFwWQIIEo8Dn8NAGzygLQrd1eA9aE/i5GV9eAN77er9MaSlAxmSFkhipB mt64d202osxhEqp3rLWDYYVTLmuCh532zUfNu5GId2FBW4rTjK4fIUVliG6HMI/Islk+aBEpc jJnVXdv1RkzYulxwSrs03Y09vcsxaP1fAprVeG1SHecrgXTFgRbc3gqOg0R7/nshMVlvCvPYa 0dTg9U+dw5GiWypF1qwFg6No/c6GDKkQSTcbIER2khm7et1qQQRPvpgSRB8DSbZwMELgPd06/ piEDp3JXrQv4Zn828OY6pK85afwtBLjI/ez6cgAcg27XqyNkV5DHpKfAS61KwLrSNN9lPVZDz 331uNAJgNTyQYCHAT6Y1/RvS34InPWoIh6Qte0zeF4l2VyuFK8U3XyrxZ8RHbHYd1k4JrbiBr slZfz3+JTVTTvTzvRYyt+LqR7/CY6Kpfti3U3iXjJrvuDOiwAdqqR2Lphu6K/MZ9flpLaXIOi uMm/nBCBpqXi73IOxG4N7UUPhqVkqC3wporVD8Udbd+wuF2isXyFka0ZYQMO2XzLFUyG1pAEL I4f/06Ke5bqM4EH6ZTBjpe/RTN6FDnlnnBKF5cBMqCwxbBkBjWtb6YmqozzUPIj2gbNrn2QuJ XHUSYgmTA1lRXc= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54405-done Cc: 54405-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Version: 29.1 David Landell writes: Hi David, > 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'? File-local, directory-local and connection-local variables are set independently. All of them are implemented as buffer-local variables, that means, if a given variable is both file-local and connection-local (or directory-local), there might be conflicts. Until now, there is no mechanism to avoid this (AFAIK). > Anyway, on my end this can be resolved, I have a workaround in place. So > this is mostly FYI. OK, closing the bug. > Cheers, > David Best regards, Michael. ------------=_1647678302-32537-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Mar 2022 20:45:22 +0000 Received: from localhost ([127.0.0.1]:49688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUE2k-0002Go-97 for submit@debbugs.gnu.org; Tue, 15 Mar 2022 16:45:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:49332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUE2i-0002Gg-9d for submit@debbugs.gnu.org; Tue, 15 Mar 2022 16:45:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUE2h-0000xJ-Ta for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 16:45:20 -0400 Received: from mailtransmit05.runbox.com ([185.226.149.38]:49476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUE2f-00007p-Fc for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 16:45:19 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1nUE2X-00Bfy7-7a for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 21:45:09 +0100 Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1nUE2R-0003gH-Ik for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 21:45:03 +0100 Received: by submission01.runbox with esmtpsa [Authenticated ID (666394)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1nUE2L-0006Mn-A6 for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 21:44:57 +0100 From: David Landell To: bug-gnu-emacs@gnu.org Subject: 27.1; How to reset connection-local variable Date: Tue, 15 Mar 2022 21:44:49 +0100 Message-ID: <867d8vc5dq.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.226.149.38; envelope-from=david.landell@sunnyhill.email; helo=mailtransmit05.runbox.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Hi, Is it possible to reset a connection local variable to the default in a buffer when default-directory changes from remote to local? I have attached an example ert test to demonstrate the issue. I would kind of expect the supplied code to work but I may be doing something wrong and there might be some other way of doing this. Couldn't find anything in the manual though. To run the code: emacs -Q -l ./connection-local.el The problem is a real world problem from my package rg.el (https://github.com/dajva/rg.el). It is similar to the grep.el package with the added possibility to rerun a searches with modified parameters from the results buffer. So a typical use case would be to do a search on a remote host and then change the default-directory in the results buffer to do the same search on the local computer. The connection local is used to store the path to the ripgrep executable that is driving the search. Best regards, David Landell --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=connection-local.el Content-Transfer-Encoding: quoted-printable Content-Description: Code to reproduce (require 'ert) (defvar connection-var 'local) (ert-deftest connection-locals-remote->local () ;; Setup connection locals for localhost (connection-local-set-profile-variables 'my-connection-profile '((connection-var . remote))) (connection-local-set-profiles '(:machine "localhost") 'my-connection-pro= file) (with-temp-buffer (setq default-directory (format "/sudo:%s@localhost:%s" (user-login-name) "/tmp")) (hack-connection-local-variables-apply (connection-local-criteria-for-default-directory)) (should (eq connection-var 'remote)) (setq default-directory "/tmp") (hack-connection-local-variables-apply (connection-local-criteria-for-default-directory)) (should (eq connection-var 'local)))) (ert t) --=-=-= Content-Type: text/plain In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19 built on lgw01-amd64-021 Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Linux Mint 20.2 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Ran 1 tests, 0 results were as expected, 1 unexpected Making completion list... Configured using: 'configure --build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp --program-suffix=27 --with-modules --with-file-notification=inotify --with-mailutils --with-harfbuzz --with-json --with-x=yes --with-x-toolkit=gtk3 --with-lcms2 --with-cairo --with-xpm=yes --with-gif=yes --with-gnutls=yes --with-jpeg=yes --with-png=yes --with-tiff=yes --with-xwidgets 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs27-bifpWT/emacs27-27.1~1.git86d8d76aa3=. -fstack-protector-strong -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie'' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LC_MONETARY: sv_SE.UTF-8 value of $LC_NUMERIC: sv_SE.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tramp-cache tramp-sh tramp tramp-loaddefs trampver tramp-integration tramp-compat shell pcomplete comint ansi-color ring parse-time iso8601 time-date ls-lisp format-spec auth-source cl-seq eieio eieio-core eieio-loaddefs password-cache json subr-x map files-x thingatpt cl-extra seq byte-opt bytecomp byte-compile cconv cl-macs gv ert pp ewoc debug backtrace help-mode easymenu find-func cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 76214 9618) (symbols 48 9041 1) (strings 32 26513 2007) (string-bytes 1 933622) (vectors 16 15642) (vector-slots 8 191670 10146) (floats 8 60 122) (intervals 56 347 0) (buffers 1000 15)) --=-=-=-- ------------=_1647678302-32537-1-- From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54405: 27.1; How to reset connection-local variable Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Mar 2022 15:59: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 To: Michael Albinus , David Landell Cc: "54405-done@debbugs.gnu.org" <54405-done@debbugs.gnu.org> Received: via spool by 54405-done@debbugs.gnu.org id=D54405.164770548117580 (code D ref 54405); Sat, 19 Mar 2022 15:59:02 +0000 Received: (at 54405-done) by debbugs.gnu.org; 19 Mar 2022 15:58:01 +0000 Received: from localhost ([127.0.0.1]:60473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVbSr-0004ZM-1y for submit@debbugs.gnu.org; Sat, 19 Mar 2022 11:58:01 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:41970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVbSo-0004ZD-MI for 54405-done@debbugs.gnu.org; Sat, 19 Mar 2022 11:58:00 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22JDh8dk027688; Sat, 19 Mar 2022 15:57:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=B+8Vxic6dGJVYnpP1cO4TFn7ob8I1+0YO99CkFtlxow=; b=NisltoyTOUnTkCoIGT7x4AKyv2izdul3/ROIlAtEUAVAVLBh61WZOuguU4uZFHVVxJB3 EkXkdKb8GxGSRNFmM3LMLkm/6bbiMVd7XLJq4+lZ4eePghf2zdGAED0WRLsx2lcQ6N5H aaDDhJ1BKtXvUc3Gk1qfSq11kbSBe3lwIbmoQE4OKjRXgYi/FiPr8o4V8puWj27vqy+p JbBdhSOeZ8PIJPixdkH9L1thPcTiXgIPMc7tTvcSVsqt+8Ip2y1sqZl17MvLVo4yELCy BU7seEt8cj1h1N2NWi14JyXGYriS187+myDYDgLBJbiEaABE3raMYD4PLgzZupMWhbG4 jw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3ew5y1rmwf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 19 Mar 2022 15:57:57 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 22JFqfKt087380; Sat, 19 Mar 2022 15:57:56 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by aserp3020.oracle.com with ESMTP id 3ew6yyp1t4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 19 Mar 2022 15:57:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gv6eKn7zhrHilqi0o7Cda8OpVfwfwix3G7K16wDwCXqfaS5voBfGshLLWHJVZb2h1deTDX6BZJyuerd1CakGik/mUB84Kb2aqfe8zyUGFnYSNJqUeY0OGtu/FpcLS6QKWg+Yqam+Wbezg6LH5kp3DDyAk2iJpRijJ9l+4bFhRft5ZaJwDG/MCqVFsFpC5T/MckV0mCHMnsZtJgj4PQc8trF77zW6iyYO7B8jBbNwmp/wGnIEo4bYd9r10W+i0xeKSAIUmfxpWGARy0tZPwTIJTI0OX/5lKZTn/lUqlt2lBeeCHgSnIjIxggQ8difX77GQnalEtjzyyUF4Nm4vhl7bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=B+8Vxic6dGJVYnpP1cO4TFn7ob8I1+0YO99CkFtlxow=; b=lANr2OlIZog9zlhwZ+rG9bedymk9h9k6CugxtVKfIkqxCKmnY7IzE6irggyWGcwWdiffdDi82iNvkCjBa88L8zTTeWMENWYPoeizZ6amgaFuQPySiSLxXYfgdgx9pY7TdSXNHP6qElsvQznH1PV0qjiwfvUD6n3qOC4vd0tjc5e9igtIqMKgLsNbxxIh/+dRoybGCEAPJflEG/DlN6tbEiwpMk788JhCpcexRSviEke3UQAtt+urv3uvOB5bCEg3brwQa0wG/SrO72DPR4nzl29Evfo+aoSsE5Mp8lUuwKSsqSpglScxRz0qmw5WYCaL167dHv+SNpEbDWG5qCf15A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B+8Vxic6dGJVYnpP1cO4TFn7ob8I1+0YO99CkFtlxow=; b=ZDE3kk0KkNu4P0fsUHMWF+cb2IP2u+NZXQ3fD3I7FwQvjXubLJeFFQUeTaCJjMGkjAo7/1PJIKtbwC7TdgwgAZZgjYGCqNgeC3pgMgz8NsGz7MOwvsEEw5wBeBaYilDF6VPsxnsNfR31MleDz3ZwzUAR9/fdv1yaWg5E0TZjq2g= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by DM6PR10MB3052.namprd10.prod.outlook.com (2603:10b6:5:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.14; Sat, 19 Mar 2022 15:57:54 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::ec69:8077:89b0:4379]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::ec69:8077:89b0:4379%7]) with mapi id 15.20.5081.021; Sat, 19 Mar 2022 15:57:54 +0000 From: Drew Adams Thread-Topic: [External] : bug#54405: 27.1; How to reset connection-local variable Thread-Index: AQHYO2rbonIm8HwlLkKlflbQdbFCfKzG3GXg Date: Sat, 19 Mar 2022 15:57:54 +0000 Message-ID: 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> <87h77vij8i.fsf@gmx.de> <864k3vi4gt.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> <871qyye4er.fsf@gmx.de> In-Reply-To: <871qyye4er.fsf@gmx.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 847042ac-53bc-4b49-3ebf-08da09c13ae4 x-ms-traffictypediagnostic: DM6PR10MB3052:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yhnzKJZFI2NmfDT8ZJ7+vcwUA1iC6yaiK7HOyy43JqcA8/VkrcSKnV1KCfmJuZSXLue7Cgr9ibWM/gHTnUNujtFp0rtzzO+SWXc0P043/wq8zTzXQSWc5X5akbf5rPntHbaR07gnV752rwrjYiDXwC/CusEY+x5tlkfC1sUQJgPZBItBywK5UxhXQ71s/TVKIFw2oorOWjWhx+BidxSn6S+50ua41ck4SjspT4ZudihU3rt4eYS3Ao7G08b3W9CqKEugaU2CTxXaB2ul346I6Ap7qjnUUxeSP1jdSHLYh34L5DbsWfAnSJWRQk+cqapFW1S3N3b7XrHuVlTfNTDfF5cQTdH6hTpVhQEPz0Trowc0u6qzXbpSqXnF4X6VzqRTc71zFL7t98+4ZVFBSbce3kL0yIk6HZhSDD25YiMo2So5HBEmaaJ2JaqO+qxE4WtwlcFHtYTSsqeZ3s+wIMxMbZppQvU5+dluR1MoDBJzKAdcB4ktS9d1kyxwWIjoPT6H1TKFUo3rhROM/LDsK3Oqeh4hhl8nFp7X1WhuESj9yJJjbGy1HvZ8l/N3bUh3s4k8+U5ZPEd+gS2pWhWvjTNroTZm8b09TaY+BNYQl69Lqc2FuCz6oCb52Vz3+Jgkpo111F07JWP1rirUJ2gRPYEfRbyHThCqh45sr2NQ7SG1BfFpmg2aljm8JiHHJqVCuD1x5Ds6bA2dBXlufERPMzmprQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(186003)(26005)(316002)(52536014)(8936002)(38070700005)(55016003)(38100700002)(86362001)(33656002)(9686003)(2906002)(508600001)(6506007)(7696005)(122000001)(83380400001)(110136005)(71200400001)(44832011)(66946007)(76116006)(4744005)(66556008)(8676002)(64756008)(66476007)(66446008)(4326008)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: xCXeg76fIJbJvx8Yqd76FdwA2smHNtVChGoklTOzsd0Xkfcg2/QjEAm+WJlTTZoB4X3LGxH4TXEXKwrB2N2RGHGEbyWzO/UfaVfyv6bdS7WP9y3dZ6BlLh01hOLmAbPeNVnFcT7kQxfIPoyKXFmvsn76BSz2wObW8QKH7mURG6CtjAleEr+Mxjh/36bTJYnjQLk+AoXwvqcO7aeabSnPZ7Ga2re0yzuRoQ61K3lweSSvD50nx2s7M136wfsQh9TFgVCKoKtqj878O9GVHxQHvDas3KI+FyHqtoccXS8xWpN1xU7puaWhQK7nob8DWZYwl+8zdJk2IKxDoltvxHUEbt2RJ0/cAOEm+/TK1DtZb4Q+IKbEQ9Enl5AO/uKzHqnCRTY7GpaIuD73XKw+q9i9w6cYJakX1ot6m2cOeYLai6WhApzRtUI0BZxqt7ZGjlSeK3F7IsqYVzfb2AVYROCWTSVtAEyy6z7jp4F0KBla9sCKrAGPtS0RAnkG3f3lMbIFbjtpNfs4bNHXlXuIJBg4Ds9w8PCLXG1olytLh9BOAe1Qj7DQ5BWQfuGilWJaOUpqg2KrE0fPIoLIxCJbG8PVRxSeOD7FkVxg1doKnrMDCoFBcnCTlMpyqUDTolGA6s01+hyCyYZjUbXXkKttgwsvn8sh3B9f7S05kccuVuNf/ANLCkiHBwsuzHnlrYsgdF5DQzzMQPdcjH4WN/YXVcwpsDUO3qyVAfQ0zeZCVvMbXbYiwW/jDONuBLhYwOJLAt7BfVQvn1tzeOLbB37JRLqt551MW5PAhNpvLujBqsoPOaUXOf81ZhM6dKBAuAyVrygKgu7CdTtW7HHP5fxsQcmcKeHBzbKFe75XQtF7xXJZaAh9NDgLIxOX2tLQUdQKsX/Ku5jbNNTkkuCs3es8jdPFshc1rnE/KOA3pI4KXNe45zJSGK9N55fLGH5mfGF1kUtQIEUtw69KziOW+FDIhWm0Lri4Lj9BXCz5bWCYK45uCgn7IKWomf2QGx4YFeeZ/j+TwSNL++HQBtBD/pjvfWKO3aoEgWzc/58MJJTuHLIiYI1MTr2D9zWMq0or7svoLUo5/PpHl+lP5Y96mxjIrjW3g9+0WfiU6hj6XFTbGKUAXDedY+VAikAVbGI1Xl/6dtmHUUZqC4pK+AnnkmrBN///m07UMnye4OZWAHG+08XFfhHFGYHT3RdrBKrv3iGOgbP7JwnaOoL0Eqz7+531HuKoJWuJNkCr0bPN4W5YTDlEy/8Dsq4YpBt51d2eWQuwzuF92wxvKPEb9zXHrivrWOWohTm1lwEUH1jJPmmkG/HBESTB4dBSPob5LoS7XmTIBRGcneE0rI3TJ8qSigr80ywxbA7hcnF112UwsA0eBt3MqJK+kHrF98ghxco4AHk2MpCnDic66sG9fqG9k0UCGb5bX5efvoZ/+YjpFnxZ4KUfTIN8eCrkTIOg76UVFNWTwTJ2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 847042ac-53bc-4b49-3ebf-08da09c13ae4 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2022 15:57:54.6784 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9Nh6ObjmJaP3cm47tVBQt2/l5+UUKBN598VfX4Bpj7KQ6vJemSSeDMn+5gQ9w7KFqzr4n8isq+mLi23jEkvitA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB3052 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10291 signatures=694221 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxlogscore=922 bulkscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203190108 X-Proofpoint-GUID: qHYNzDnFIW4_gIzHrU3GxRAp5h19OwRY X-Proofpoint-ORIG-GUID: qHYNzDnFIW4_gIzHrU3GxRAp5h19OwRY X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > File-local, directory-local and connection-local variables are set > independently. All of them are implemented as buffer-local variables, > that means, if a given variable is both file-local and connection-local > (or directory-local), there might be conflicts. >=20 > Until now, there is no mechanism to avoid this (AFAIK). Good to know. Thx. I haven't checked the doc for each of those kinds of var. But do we mention what you say in the doc? E.g., do we say that a var that's local in more than one of these ways might be problematic ("there might be conflicts")? Should the doc say clearly what happens (e.g., what determines the order or priority)? From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54405: 27.1; How to reset connection-local variable Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Mar 2022 17:58: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 To: Drew Adams Cc: "54405@debbugs.gnu.org" <54405@debbugs.gnu.org>, David Landell Received: via spool by 54405-submit@debbugs.gnu.org id=B54405.164771265230362 (code B ref 54405); Sat, 19 Mar 2022 17:58:02 +0000 Received: (at 54405) by debbugs.gnu.org; 19 Mar 2022 17:57:32 +0000 Received: from localhost ([127.0.0.1]:60553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVdKW-0007td-A9 for submit@debbugs.gnu.org; Sat, 19 Mar 2022 13:57:32 -0400 Received: from mout.gmx.net ([212.227.15.15]:59083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVdKU-0007tQ-Se for 54405@debbugs.gnu.org; Sat, 19 Mar 2022 13:57:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647712640; bh=ugoiY7Off8B3vm/99xmpvf/dpNR9poRG6gMmXBNYxWw=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=fOGaLZDwh0tgz5n86AonuQ/GeUd3axF1NYzn6wbdYSjxqExLV+ApHmZ2yxiVKpoCG SANmTzJPIA2V1pCPJX9jdp1h6h/zmIJLyy1maUxSH7xz7weTHwQpcgUE8GhMybebs6 JgTfwPgwa9niDoVhjzDKRcZGBNhY+vArr+ZUEmd4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.159.32]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MfpOd-1o314r2AhN-00gGm7; Sat, 19 Mar 2022 18:57:20 +0100 From: Michael Albinus 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> <87h77vij8i.fsf@gmx.de> <864k3vi4gt.fsf@tiefighter.i-did-not-set--mail-host-address--so-tickle-me> <871qyye4er.fsf@gmx.de> Date: Sat, 19 Mar 2022 18:57:18 +0100 In-Reply-To: (Drew Adams's message of "Sat, 19 Mar 2022 15:57:54 +0000") Message-ID: <87sfrdddvl.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:SeeMao3dzS8as47bXiikqmDl8DLHYaM5i7YM7ZWw3nBkGqaASwN RYKmNRoGDPJ/Y4IBITOP6HTzkzrmUksIUWUXOT+IAw+CxXPUagiXiXY1cSFRpsOabxwKQWn cWsjuYmhjPXD1eDJr0ebHPu+szFdfXIQa0H9N7lckdRPVIeUcdLCYnu4gXJ4Ag5f6+FuVsl d2E/QO4hYEKkieKhQsZ+w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Xu6uRxU1TBg=:of27l6mjdqGyw7UK72EU1h 87NvPWzA3Tcr2zcu/cnfxLstV46LCsf0rzhllGdTkAMGnW110Y7jLkLPyWyO3cxzfEqdoKIre CGc+DuAk5xSuSDeB4yyjzrwLZpSXago3hjdsNRA10/Ok/VftbdfHw+zbg9zxh15GY9r57Elds xvEcJBA11Nh8StJSk59BsqigtkoTYhaVRqIvXKgX8FxyduIbeBAgPtG91mFiiwVmG6j655f+H x577Ih2Fx69el2wE0+aigU6xv24tFXx57jCZX+QyD2fQw+b1VajEvH2cgWgS9diUGkp6fqzvg M0nX6KYe8tcGUZeiObhxdmlYoVAG2WlsNhynAwCSW6YGKiY+J/PcqwGWdsu0vd5wJnnoDKnl2 ppJkJbigCML9CgTHe9ohZUiBbLKddTTp+Sr6yFAJTF3jzr9w8Lg3g/GRxmwhUqt0+sKTcBbUf BJNLb0tJJ8iy08/r8/ge1XNFBNVYphCCHyo9eWyG+5TgsiH2MY25jO0v+/j84lCmW5oIWw4Io xALfXSVt+sDLW25IQRVtOOGJLDDBjudn665gYz6T5d+ZBOFgoJKgDDm/X88QNBKD+ywwswxHV nl+WjHz3X+1IMyhRIA5vdB9k3HstJjeq8dIdiAtsiLul/PbQo7u5LS4+/wG33OSOSrzK1R6ts 8SAX8x4cPYruRDyJJauQ8jiOORaIq60yIvgrrR8DmiJL3Tj185O4+XZTeiBlX+oyjfcW9OmKf J8WESxV7odk/9QNQPZv5ExbkwLV3zviUE7aGqXDBOSyPIL0iGto7bbRYbH+ZXiwtsFB16fTi5 0cooxF3mrLG1WVvXf21yj4D7GeUdbmUHLKLcL/LKnOT7MLuDqQG5K03RFGJHJz2nqP78Iyo1p C/uZR2DTRDop/c8zZgV06C12mcWZP22ypAPpSQPynvlmMzUQ9o6N/j9PdriEL3D5CZK1YNH3/ fUBhdoARUVBAZZyMV4/wCb3a79bib26oqiPQIJ3QcUbY/OmXDhaP7u67rrHNKi5EhitUuG+NV eT2wnLcDp4qgaqC1fiLS0Aim/xY/hgKzSsT58NzSLsYd+HC9Is1+JfI6SHJFa2gwCIgEscKl8 5uRp06mHYr+90k= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Drew Adams writes: Hi Drew, > E.g., do we say that a var that's local in more > than one of these ways might be problematic ("there > might be conflicts")? Should the doc say clearly > what happens (e.g., what determines the order or > priority)? It is documented that in case a variable has both file-local and directory-local settings, the file-local value will be used. See (info "(emacs)Directory Variables") (at the bottom). Otherwise, it is kind of undetermined, I believe. Every package (author) is free to call `hack-local-variables', `hack-dir-local-variables' or `hack-connection-local-variables' in any order. Best regards, Michael.