GNU bug report logs - #12864
24.3.50; bad & confusing Customize `State' Menu behavior

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 11 Nov 2012 20:26:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.3.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 12864 <at> debbugs.gnu.org
Cc: Drew Adams <drew.adams <at> oracle.com>
Subject: bug#12864: 24.3.50; bad & confusing Customize `State' Menu behavior
Date: Tue, 1 Sep 2020 13:02:55 -0300
[Message part 1 (text/plain, inline)]
Drew Adams <drew.adams <at> oracle.com> writes:

> emacs -Q
>
> M-x customize-option delete-old-versions
>
> Value Menu: Leave
>
> State: Revert This Session's Customization
>
> The State is now back to STANDARD, which is correct.
>
> In the State menu, this item is not dimmed, but should be, since there
> should be no backup value different from the original value (Ask): Set
> to Backup Value.

Would it make sense to guard against backing up a value, if it's the
same as the new one? That way, Set to Backup Value would be disabled in
this situation.

> Choose Set to Backup Value anyway.  The State now shows "SET for current
> session only, which is incorrect (at best misleading).

I think this is a bug in `custom-variable-state': the first cond clause
doesn't check if value is equal to the standard-value, so it just
returns 'set.  It should check for it and return the correct state.

> The State menu now shows items Set to Backup Value and Revert This
> Session's Customization, both of which are incorrect and misleading.
> (The current value is the standard value, and we reverted to it.

Doing the two fixes above will fix this...

> Choose Revert This Session's Customization anyway.
>
> State now says CHANGED outside Customize, which is 100% wrong.  And the
> State menu shows Undo Edits, Revert This Session's Customization, and
> Set to Backup Value, all of which are wrong (and confusing).

...But this message can still appear when it shouldn't:
emacs -Q
M-x customize-option RET delete-old-versions
Set the variable to Delete, for the current session.
Set to Backup Value, to bring back the standard value of
delete-old-versions.
Then Revert This Session's Customization.

This is a bug in `custom-variable-reset-saved': it is not resetting the
'variable-comment property of the variable when there is no saved-value,
and that confuses `custom-variable-state'.

> Choose Undo Edits anyway.  It has no visible effect - State and its menu
> stay the same.  Again, confusing.
>
> Choose Set to Backup Value anyway.
>
> State now says SET for current session only, which is (still) wrong.
> And the same menu items are available, except Undo Edits.  Choosing Set
> to Backup Value again has no visible effect.  Choosing Revert This
> Session's Customization has the same incorrect effect as before (adds
> Undo Edits to the menu and changes State to CHANGED outside Customize.
>

I think this is just a consequence of the above three bugs.  IOW, no new
bug here.

I'm not sure how to proceed here: should I send different patches for
the bugs, or put the fixes altogether in one patch?
[Message part 2 (text/html, inline)]

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

Previous Next


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