From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15214: 24.3.50; `Revert This Session's Customization' does not do what it says Date: Wed, 01 Jan 2020 18:36:34 +0200 Message-ID: <83mub7jfql.fsf@gnu.org> References: <8b504c44-91b3-4c9f-bca5-3b4d1547f67f@default> <83mub8laut.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="216135"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 15214@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 01 17:37:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1imgzf-000u4N-9I for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jan 2020 17:37:11 +0100 Original-Received: from localhost ([::1]:59854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imgzd-0001wH-UL for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jan 2020 11:37:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35807) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imgzX-0001vp-Iy for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 11:37:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imgzW-00005T-K3 for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 11:37:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59748) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1imgzW-00005M-GR for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 11:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1imgzW-0002G1-En for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 11:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jan 2020 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15214 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15214-submit@debbugs.gnu.org id=B15214.15778965888627 (code B ref 15214); Wed, 01 Jan 2020 16:37:02 +0000 Original-Received: (at 15214) by debbugs.gnu.org; 1 Jan 2020 16:36:28 +0000 Original-Received: from localhost ([127.0.0.1]:37488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imgyy-0002F4-6z for submit@debbugs.gnu.org; Wed, 01 Jan 2020 11:36:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imgyx-0002Ep-By for 15214@debbugs.gnu.org; Wed, 01 Jan 2020 11:36:27 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1imgys-0006rN-69; Wed, 01 Jan 2020 11:36:22 -0500 Original-Received: from [176.228.60.248] (port=1283 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1imgyp-0004FL-KI; Wed, 01 Jan 2020 11:36:20 -0500 In-reply-to: (message from Mauro Aranda on Wed, 1 Jan 2020 11:47:45 -0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174046 Archived-At: > From: Mauro Aranda > Date: Wed, 1 Jan 2020 11:47:45 -0300 > Cc: 15214@debbugs.gnu.org > > > You should instead click "Set to Backup Value". The Revert button is > > in general for variables you have saved for future sessions. > > For user options that are of boolean type, that works well. But for > other kinds of user options, there is a risk it won't work: > > 1. emacs -Q > 2. M-x customize-variable dired-kept-versions > 3. Edit the field to 3 and then Set for current session. > 4. Now edit it to 4, and then Set for current session. > > Now "Set to Backup Value" won't ever take you back to the state before > your session's customizations. "Set to Backup Value" reverts to the previous value, not to the original one. So this is working as intended. > > >> 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 > > What part of the doc string do you find ambiguous? The "reset" part. > I still think it would be a good addition to the code. In case you are > OK with it, I attach a patch with moves the funcall outside of the > if-else form. It LGTM, thanks.