all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: 12864@debbugs.gnu.org
Subject: bug#12864: 24.3.50; bad & confusing Customize `State' Menu behavior
Date: Tue, 1 Sep 2020 13:02:55 -0300	[thread overview]
Message-ID: <CABczVwdZjme6DCf79GN5Eii27XDi8jpK_sJwTpcQzTkQQLu8eg@mail.gmail.com> (raw)
In-Reply-To: <A4A932D43552464587635E86A316AE8B@us.oracle.com>

[-- Attachment #1: Type: text/plain, Size: 2602 bytes --]

Drew Adams <drew.adams@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?

[-- Attachment #2: Type: text/html, Size: 3076 bytes --]

  reply	other threads:[~2020-09-01 16:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-11 20:25 bug#12864: 24.3.50; bad & confusing Customize `State' Menu behavior Drew Adams
2020-09-01 16:02 ` Mauro Aranda [this message]
2020-09-01 16:20   ` Stefan Kangas
2020-09-01 20:17     ` Mauro Aranda
2020-10-22 14:50       ` Mauro Aranda
2020-10-22 14:56         ` Lars Ingebrigtsen
2020-10-22 15:14           ` Mauro Aranda
2020-10-22 15:51           ` Drew Adams
2020-10-23 12:04             ` Mauro Aranda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABczVwdZjme6DCf79GN5Eii27XDi8jpK_sJwTpcQzTkQQLu8eg@mail.gmail.com \
    --to=maurooaranda@gmail.com \
    --cc=12864@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.