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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12864 in the body.
You can then email your comments to 12864 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Sun, 11 Nov 2012 20:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 11 Nov 2012 20:26:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.3.50; bad & confusing Customize `State' Menu behavior
Date: Sun, 11 Nov 2012 12:25:12 -0800
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.
 
Choose Set to Backup Value anyway.  The State now shows "SET for current
session only, which is incorrect (at best misleading).
 
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.
 
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).
 
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.
 
This is a confusing mess.
 
Without emacs -Q it is even more confusing, with Reset to Saved added to
the mix.
 
One thing that is not clear in the behavior is that Set to Backup Value
seems sometimes to be available without Reset to Saved (even without
emacs -Q).  If you have made changes to the value that have not been
saved, then I would think that Reset to Saved would always be available
(until you choose it or you save).

In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2012-11-05 on MS-W7-DANI
Bzr revision: 110809 lekktu <at> gmail.com-20121105172930-a5gn0bwi4lndchhw
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -I../../libs/libXpm-3.5.10/include -I../../libs/libXpm-3.5.10/src
 -I../../libs/libpng-1.2.37-lib/include -I../../libs/zlib-1.2.5
 -I../../libs/giflib-4.1.4-1-lib/include
 -I../../libs/jpeg-6b-4-lib/include
 -I../../libs/tiff-3.8.2-1-lib/include
 -I../../libs/libxml2-2.7.8-w32-bin/include/libxml2
 -I../../libs/gnutls-3.0.9-w32-bin/include
 -I../../libs/libiconv-1.9.2-1-lib/include'
 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Tue, 01 Sep 2020 16:04:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 12864 <at> debbugs.gnu.org
Cc: Drew Adams <drew.adams <at> oracle.com>
Subject: Re: 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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Tue, 01 Sep 2020 16:21:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Mauro Aranda <maurooaranda <at> gmail.com>, 12864 <at> debbugs.gnu.org
Subject: Re: bug#12864: 24.3.50;
 bad & confusing Customize `State' Menu behavior
Date: Tue, 1 Sep 2020 09:20:52 -0700
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> I'm not sure how to proceed here: should I send different patches for
> the bugs, or put the fixes altogether in one patch?

Some other projects emphasize smaller and logically self-contained
patches.  Here, the preference definitely seems to be towards making
bigger patches rather than many small ones.  But I'm not aware of any
strict policy in this regard; it seems to be mostly at your own
discretion.

Someone will correct me if I'm wrong, but my take is this:

It's really up to what you feel makes more sense: if they are closely
related, you might prefer sending them in one patch; otherwise, it might
be better to send the changes in separate patches.

(My personal preference is to avoid bundling unrelated changes.
 But I don't always work like that in Emacs.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Tue, 01 Sep 2020 20:18:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 12864 <at> debbugs.gnu.org
Subject: Re: bug#12864: 24.3.50;
 bad & confusing Customize `State' Menu behavior
Date: Tue, 1 Sep 2020 17:17:29 -0300
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefankangas <at> gmail.com> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> I'm not sure how to proceed here: should I send different patches for
>> the bugs, or put the fixes altogether in one patch?
>
> It's really up to what you feel makes more sense: if they are closely
> related, you might prefer sending them in one patch; otherwise, it might
> be better to send the changes in separate patches.
>

Hello Stefan,

Thanks for your answer.

I went with a single patch.  If after seeing the patch someone feels it
should be split, just let me know.

Please review, and thanks.
[Message part 2 (text/html, inline)]
[0001-Make-State-button-interaction-less-confusing-Bug-128.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Thu, 22 Oct 2020 14:51:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 12864 <at> debbugs.gnu.org
Subject: Re: bug#12864: 24.3.50;
 bad & confusing Customize `State' Menu behavior
Date: Thu, 22 Oct 2020 11:50:01 -0300
[Message part 1 (text/plain, inline)]
tags 12864 patch
quit

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

> I went with a single patch.  If after seeing the patch someone feels it
> should be split, just let me know.

ping.

I've been using Customize with this patch, without noticing any
trouble.  I hope someone can review it soon.
[Message part 2 (text/html, inline)]

Added tag(s) patch. Request was from Mauro Aranda <maurooaranda <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 22 Oct 2020 14:51:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Thu, 22 Oct 2020 14:57:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Stefan Kangas <stefankangas <at> gmail.com>, 12864 <at> debbugs.gnu.org
Subject: Re: bug#12864: 24.3.50; bad & confusing Customize `State' Menu
 behavior
Date: Thu, 22 Oct 2020 16:56:42 +0200
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> I've been using Customize with this patch, without noticing any
> trouble.  I hope someone can review it soon.

Skimming it, it looks fine to me, so I've pushed it to the trunk.

And if there's any more outstanding patches of yours that has fallen
between the cracks, please do ping the relevant bug reports.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 22 Oct 2020 14:58:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 12864 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 22 Oct 2020 14:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Thu, 22 Oct 2020 15:15:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Stefan Kangas <stefankangas <at> gmail.com>, 12864 <at> debbugs.gnu.org
Subject: Re: bug#12864: 24.3.50;
 bad & confusing Customize `State' Menu behavior
Date: Thu, 22 Oct 2020 12:14:27 -0300
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> I've been using Customize with this patch, without noticing any
>> trouble.  I hope someone can review it soon.
>
> Skimming it, it looks fine to me, so I've pushed it to the trunk.

Thanks.

> And if there's any more outstanding patches of yours that has fallen
> between the cracks, please do ping the relevant bug reports.

I think I've run out of those, unfortunately.  All I have is some tests
that demonstrate the problem in Bug#21355, but I haven't worked in a fix
yet.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Thu, 22 Oct 2020 15:52:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Stefan Kangas <stefankangas <at> gmail.com>, 12864 <at> debbugs.gnu.org
Subject: RE: bug#12864: 24.3.50; bad & confusing Customize `State' Menu
 behavior
Date: Thu, 22 Oct 2020 08:51:10 -0700 (PDT)
Thanks for working on this, Mauro.
I haven't checked the fix, but I'm sure it's good.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12864; Package emacs. (Fri, 23 Oct 2020 12:06:02 GMT) Full text and rfc822 format available.

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

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

> Thanks for working on this, Mauro.
> I haven't checked the fix, but I'm sure it's good.

No need to thank me, it's my pleasure.
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Nov 2020 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 151 days ago.

Previous Next


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