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: Tue, 31 Dec 2019 18:26:50 +0200 Message-ID: <83mub8laut.fsf@gnu.org> References: <8b504c44-91b3-4c9f-bca5-3b4d1547f67f@default> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="261601"; 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 Tue Dec 31 17:27:11 2019 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 1imKMQ-0015vq-F1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Dec 2019 17:27:10 +0100 Original-Received: from localhost ([::1]:44266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imKMP-0002lh-8y for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Dec 2019 11:27:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34891) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imKMJ-0002lb-KP for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2019 11:27:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imKMI-0004Gp-Hi for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2019 11:27:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57292) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1imKMI-0004G6-CA for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2019 11:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1imKMI-0003RF-9S for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2019 11:27: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: Tue, 31 Dec 2019 16:27: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.157780960713191 (code B ref 15214); Tue, 31 Dec 2019 16:27:02 +0000 Original-Received: (at 15214) by debbugs.gnu.org; 31 Dec 2019 16:26:47 +0000 Original-Received: from localhost ([127.0.0.1]:35032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imKM3-0003Qg-DE for submit@debbugs.gnu.org; Tue, 31 Dec 2019 11:26:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imKM2-0003QU-OQ for 15214@debbugs.gnu.org; Tue, 31 Dec 2019 11:26:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1imKLx-0002lY-Gt; Tue, 31 Dec 2019 11:26:41 -0500 Original-Received: from [176.228.60.248] (port=4715 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1imKLw-0001go-Pl; Tue, 31 Dec 2019 11:26:41 -0500 In-reply-to: (message from Mauro Aranda on Mon, 30 Dec 2019 18:30:31 -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:173987 Archived-At: > From: Mauro Aranda > 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.