GNU bug report logs - #14247
24.3.50; Autoloaded defcustom in package loses saved setting

Previous Next

Package: emacs;

Reported by: Magnus Henoch <magnus.henoch <at> gmail.com>

Date: Tue, 23 Apr 2013 14:49:02 UTC

Severity: normal

Tags: fixed

Found in version 24.3.50

Fixed in version 25.1

Done: Mauro Aranda <maurooaranda <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 14247 <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 14247 <at> debbugs.gnu.org
Cc: magnus.henoch <at> gmail.com
Subject: Re: bug#14247: 24.3.50;
 Autoloaded defcustom in package loses saved setting
Date: Sun, 5 Jan 2020 12:25:25 -0300
[Message part 1 (text/plain, inline)]
Magnus Henoch <magnus.henoch <at> gmail.com> writes:

> 1. Set HOME to the name of an empty directory and start a fresh Emacs.
>
> 2. Put the following into a file named foo.el:
>
> ;;; foo.el --- test autoloaded defcustom
> ;;;
> ;;; Version: 0.1
>
> ;;;###autoload
> (defcustom foo-setting nil
>   "A boolean setting."
>   :type 'boolean)
>
> ;;;###autoload
> (defun foo-get-setting ()
>   (interactive)
>   (message "foo-setting is %s" foo-setting))
>
> (provide 'foo)
> ;;; foo.el ends here
>
> 3. Install foo.el with M-x package-install-file.
>
> 4. Type M-x customize-option RET foo-setting RET, set the setting to t,
> and "save for future sessions".
>
> 5. Exit and restart Emacs, still with the new home directory.
>
> 6. Type M-x foo-get-setting.  I would expect it to say "foo-setting is
> t", but it says "foo-setting is nil".
>
> At this point, M-x customize-option RET foo-setting RET will say that
> the variable is "CHANGED outside Customize", and choosing "Revert This
> Session's Customization" will set foo-setting to t, i.e. the value saved
> through Customize.

I've tried to reproduce this on the emacs-27 branch, but I can't.
I get:
"foo-setting is t", and the STATE in the customize buffer is SAVED and
set.
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 263 days ago.

Previous Next


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