GNU bug report logs - #63891
29.0.91; customize-save-variable should not save all variables if a custom file exists

Previous Next

Package: emacs;

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

Date: Sun, 4 Jun 2023 12:37:01 UTC

Severity: normal

Found in version 29.0.91

Full log


View this message in rfc822 format

From: Jimmy Wong <wyuenho <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63891 <at> debbugs.gnu.org
Subject: bug#63891: 29.0.91; customize-save-variable should not save all variables if a custom file exists
Date: Sun, 4 Jun 2023 17:49:31 +0100
[Message part 1 (text/plain, inline)]
Ok you are right, the problem seems to be somewhere in Tramp on require that sets the saved-value symbol property of connection-local-profile-alist and connection-local-criteria-alist without them being written to file, even when enable-connection-local-variables is set to nil. When custom-save-all naively scans the obarray for symbols, sees these variables having saved-value set without going through the customize machinary, it assumes they are saved to a file and saves them again.
On 4 Jun 2023 at 3:25 PM +0100, Eli Zaretskii <eliz <at> gnu.org>, wrote:
> > Date: Sun, 4 Jun 2023 15:00:01 +0100
> > From: Jimmy Wong <wyuenho <at> gmail.com>
> > Cc: 63891 <at> debbugs.gnu.org
> >
> > This branch: https://github.com/emacs-mirror/emacs/blob/emacs-29/lisp/cus-edit.el#L1109
>
> I don't know what that is. I'm using the Emacs Git repository, the
> emacs-29 branch.
>
> > No it does not saves only one variable to file, it only saves one variable to file if you have only modified
> > one variable.
>
> That's not what I see. I've modified several options using the
> menu-bar's Options menu, then typed
>
> M-x customize-save-variable RET truncate-lines RET y
>
> and saw that only truncate-lines was written to the custom file.
>
> If you see something else, please show a complete recipe that
> reproduces the behavior you see.
>
> > As a matter of fact, custom-variable-save, custom-variable-mark-to-reset-standard,
> > custom-face-save, custom-face-mark-to-reset-standard and custom-group-save all have the same
> > problem. They all call custom-save-all and they all dump all modified customizable variable values on
> > file without regard to whether it’s a single variable, face or a group the user asked Emacs to save.
>
> I wasn't talking about custom-save-all -- that indeed saves all the
> options customized in this session. I was talking about
> customize-save-variable, which prompts for a single variable and its
> value, and saves only that single variable, at least in my testing.
[Message part 2 (text/html, inline)]

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

Previous Next


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