From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#15687: 24.3.50; custom themes: disabling does not restore initial configuration Date: Thu, 14 Jun 2018 16:03:04 -0400 Message-ID: References: <87d2ln9f0b.fsf@motoko.kusanagi> <8761rf9ccv.fsf@motoko.kusanagi> <6c0691be-bed5-4e0a-bc90-87a20ccef9c1@default> <87vb7mggo6.fsf@gnus.org> <92900c1c-cf89-4679-8f16-4f8171607528@default> <87bmce1vwx.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529006527 5338 195.159.176.226 (14 Jun 2018 20:02:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2018 20:02:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 15687@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 14 22:02:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTYRW-0001GT-TC for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jun 2018 22:02:03 +0200 Original-Received: from localhost ([::1]:42722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTYTe-0002mS-41 for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jun 2018 16:04:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTYTX-0002kZ-R8 for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2018 16:04:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTYTS-0006qU-T1 for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2018 16:04:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTYTS-0006qE-Ph for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2018 16:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fTYTS-0002X5-A7 for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2018 16:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jun 2018 20:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 15687-submit@debbugs.gnu.org id=B15687.15290065899668 (code B ref 15687); Thu, 14 Jun 2018 20:04:02 +0000 Original-Received: (at 15687) by debbugs.gnu.org; 14 Jun 2018 20:03:09 +0000 Original-Received: from localhost ([127.0.0.1]:48487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTYSb-0002Vr-Bc for submit@debbugs.gnu.org; Thu, 14 Jun 2018 16:03:09 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTYSY-0002Vj-RO for 15687@debbugs.gnu.org; Thu, 14 Jun 2018 16:03:07 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w5EK34ca016060; Thu, 14 Jun 2018 16:03:04 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4162B656D5; Thu, 14 Jun 2018 16:03:04 -0400 (EDT) In-Reply-To: <87bmce1vwx.fsf@tcd.ie> (Basil L. Contovounesios's message of "Wed, 13 Jun 2018 19:41:18 +0300") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6308=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6308> : inlines <6699> : streams <1789688> : uri <2658224> 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: 208.118.235.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:147429 Archived-At: > I'm sorry if I've misunderstood something after skimming this bug > report, but I think the following recipe, starting from emacs -Q, > illustrates the central issue: > > ;; Sample custom theme touching user options and faces. > (with-temp-file (expand-file-name "foo-theme.el" custom-theme-directory) > (insert "\ > (deftheme foo) > (custom-theme-set-variables 'foo '(text-quoting-style 'curved)) > (custom-theme-set-faces 'foo '(default ((t :foreground \"white\" > :background \"black\")))) > (provide-theme 'foo)\n")) > > ;; Make changes conflicting with theme `foo'. > (setq text-quoting-style 'grave) > (set-foreground-color "green") > > ;; Load, enable, and disable theme `foo'. > (load-theme 'foo t) > (disable-theme 'foo) > > At the end of this, the value of text-quoting-style and the foreground > of the default face are nil and "black", respectively. Thanks. Looks like a good recipe which finally describes the problem. > Wouldn't it be less intrusive if they were reverted to the values they > held before enabling foo-theme, namely 'grave and > "green", respectively? There is no question about that, yes: the code is clearly written with the intention to reset those values to `grave` and "green". I'm not very familiar with this code, but I know that there's some attempt to make this work by saving the "externally modified" values into a special theme called "changed" (as opposed to the changes made via Custom which are saved in the special theme called "user"). So IIUC the above recipe shows that this special code either doesn't properly save the settings to the "changed" theme, or they're not properly used when recomputing the var's values in response to `disable-theme`. Stefan