bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63300: 29.0.90; Tramp keeps customizing variables on every connectio


From: Michael Albinus
Subject: bug#63300: 29.0.90; Tramp keeps customizing variables on every connection
Date: Tue, 06 Jun 2023 13:46:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Jimmy Wong <wyuenho@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.

Attachment: txtehT9b7zw8i.txt
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]