GNU bug report logs - #63300
29.0.90; Tramp keeps customizing variables on every connection

Previous Next

Package: emacs;

Reported by: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>

Date: Fri, 5 May 2023 10:43:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.90

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Jimmy Wong <wyuenho <at> gmail.com>
Cc: 63300 <at> debbugs.gnu.org
Subject: bug#63300: 29.0.90; Tramp keeps customizing variables on every connection
Date: Tue, 06 Jun 2023 13:46:52 +0200
[Message part 1 (text/plain, inline)]
Jimmy Wong <wyuenho <at> gmail.com> writes:

Hi,

> Actually, I take it back. customize-save-variable only saves variables
> that have the saved-value symbol property set. This property is
> normally set by customize when it is saved to the custom file.
> Something in Tramp is setting this property without saving the
> variable values to the custom file or going through customize. In
> fact, you can see it via M-x customize-option
> connection-local-criteria-alist. The value will be shown as SAVED.

This property is set as well in custom-set-variables.

> In addition, setting `enable-connection-local-variables` to nil early
> in early-init.el has no effect, the variable is still set on load.

This is a different game. enable-connection-local-variables has no
effect on setting / saving connection-local-criteria-alist and
connection-local-profile-alist. e-c-l-v is used only in
hack-connection-local-variables in order to control, whether
connection-local variables shall be set as buffer-local variables. And
the documentation is clear about, that it isn't intended to be used on
user level, see (info "(elisp) Applying Connection Local Variables")

--8<---------------cut here---------------start------------->8---
 -- Variable: enable-connection-local-variables
     If ‘nil’, connection-local variables are ignored.  This variable
     shall be changed temporarily only in special modes.
--8<---------------cut here---------------end--------------->8---

> Both of this behavior violate what is documented in the docstring and
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Properties.html.

No.

> If you must, enable-conneciton-local-variables should be respected,
> and if you must, set the theme-value property on these
> connection-local variables instead of saved-value so custom-save-all
> will not save them.

No.

In connection-local-set-profiles and connection-local-set-profile-variables
it should be checked, whether the saved-value property is set. If not,
it shall be reset to nil, after custom-set-variables has been called.

The appended patch shall do the trick. Could you, please, test?

Best regards, Michael.

[Message part 2 (text/x-patch, attachment)]

This bug report was last modified 1 year and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.