all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: 15214@debbugs.gnu.org
Subject: bug#15214: 24.3.50; `Revert This Session's Customization' does not do what it says
Date: Tue, 31 Dec 2019 18:26:50 +0200	[thread overview]
Message-ID: <83mub8laut.fsf@gnu.org> (raw)
In-Reply-To: <CABczVweUFJ0f2R=nBQnLHOY0_pBUg=OXC461mUE2COeDi1k+0A@mail.gmail.com> (message from Mauro Aranda on Mon, 30 Dec 2019 18:30:31 -0300)

> From: Mauro Aranda <maurooaranda@gmail.com>
> Date: Mon, 30 Dec 2019 18:30:31 -0300
> 
> > Click State and Revert This Session's Customization.

You should instead click "Set to Backup Value".  The Revert button is
in general for variables you have saved for future sessions.

> The function that runs for that option is custom-variable-reset-saved,
> and the doc string of custom-variable-reset-saved says something similar.

The doc string is ambiguous, and the code definitely does NOT intend
to reset the value, just to remove the recorded setting, so that it
won't be saved in the custom file.  That code was installed in
response to a very similar bug report (bug#9509, except that it
complained that Emacs signals an error for a variable that was never
saved).  I very much doubt that Chong, who made that change, omitted
setting the value by mistake.

In general, there's a feature creep here: this menu item was
originally only for customized options that were saved during this
session.  That was lifted back then, and now we want also to change
the value, although another menu item exists to do just that.

> The attached patch fixes custom-variable-reset-saved to do what it says
> it does when the variable has no previous saved value.

I won't object too much to such a change, if you still think it's TRT
here after reading the above, but I wonder whether it would be cleaner
and safer to set just the value, and move the funcall out of the
if-else form, so that we'd have only one funcall, and it will be
inside ignore-errors.

> -	;; If there is no saved value, remove the setting.
> -	(custom-push-theme 'theme-value symbol 'user 'reset)
> +        (progn
> +	  ;; If there is no saved value, remove the setting.

The comment needs to be updated, since we now don't merely remove the
setting.

Thanks.





  parent reply	other threads:[~2019-12-31 16:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30  5:10 bug#15214: 24.3.50; `Revert This Session's Customization' does not do what it says Drew Adams
2019-12-30 21:30 ` Mauro Aranda
2019-12-30 21:52   ` Drew Adams
2019-12-31 16:26   ` Eli Zaretskii [this message]
2020-01-01 14:47     ` Mauro Aranda
2020-01-01 16:36       ` Eli Zaretskii
2020-01-07 21:58         ` Mauro Aranda
2020-01-11  8:39           ` Eli Zaretskii

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=83mub8laut.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=15214@debbugs.gnu.org \
    --cc=maurooaranda@gmail.com \
    /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.