GNU bug report logs -
#63891
29.0.91; customize-save-variable should not save all variables if a custom file exists
Previous Next
Full log
Message #32 received at 63891 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
Hi Eli,
>> >> 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.
>>
>> custom-set-variables
>
> That's a different function. I was talking about
> customize-save-variable.
I know. I just wanted to clarify, where the saved-value of other user
options is set.
And customize-save-variable, although invoked with just one variable,
saves *all* variables with a saved-value property, IIUC.
A recipe you have asked for could be
--8<---------------cut here---------------start------------->8---
(defcustom a nil
"" :type 'boolean)
(defcustom b nil
"" :type 'boolean)
(defcustom c nil
"" :type 'boolean)
(custom-set-variables '(a t) '(b t))
;; Nothing happened so far in the init file.
(customize-save-variable 'c t)
;; Your init file contains then
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(a t)
'(b t)
'(c t)
...)
--8<---------------cut here---------------end--------------->8---
Best regards, Michael.
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.