GNU bug report logs - #15687
Disabling custom theme does not reset vars

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Drew Adams <drew.adams@HIDDEN>; merged with #34027; dated Tue, 22 Oct 2013 20:56:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed tag(s) moreinfo. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 15687 34027. Request was from Michael Albinus <michael.albinus@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 14 Jun 2018 20:03:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 14 16:03:09 2018
Received: from localhost ([127.0.0.1]:48487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fTYSb-0002Vr-Bc
	for submit <at> debbugs.gnu.org; Thu, 14 Jun 2018 16:03:09 -0400
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1fTYSY-0002Vj-RO
 for 15687 <at> debbugs.gnu.org; Thu, 14 Jun 2018 16:03:07 -0400
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
Received: by pastel.home (Postfix, from userid 20848)
 id 4162B656D5; Thu, 14 Jun 2018 16:03:04 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: "Basil L. Contovounesios" <contovob@HIDDEN>
Subject: Re: bug#15687: 24.3.50;
 custom themes: disabling does not restore initial configuration
Message-ID: <jwvo9gdkunf.fsf-monnier+bug#15687@HIDDEN>
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <87d2ln9f0b.fsf@HIDDEN>
 <e8fd319e-7f56-49ee-9a5f-93022c281740@default>
 <8761rf9ccv.fsf@HIDDEN>
 <6c0691be-bed5-4e0a-bc90-87a20ccef9c1@default>
 <87vb7mggo6.fsf@HIDDEN>
 <92900c1c-cf89-4679-8f16-4f8171607528@default> <87bmce1vwx.fsf@HIDDEN>
Date: Thu, 14 Jun 2018 16:03:04 -0400
In-Reply-To: <87bmce1vwx.fsf@HIDDEN> (Basil L. Contovounesios's message of
 "Wed, 13 Jun 2018 19:41:18 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15687
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 15687 <at> debbugs.gnu.org,
 Drew Adams <drew.adams@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 14 Jun 2018 19:53:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 14 15:53:23 2018
Received: from localhost ([127.0.0.1]:48478 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fTYJ9-0002Fr-4X
	for submit <at> debbugs.gnu.org; Thu, 14 Jun 2018 15:53:23 -0400
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:52022)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1fTYJ6-0002Fi-QE
 for 15687 <at> debbugs.gnu.org; Thu, 14 Jun 2018 15:53:21 -0400
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 w5EJrJZE014134;
 Thu, 14 Jun 2018 15:53:19 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id 661E0656D5; Thu, 14 Jun 2018 15:53:19 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#15687: 24.3.50;
 custom themes: disabling does not restore initial configuration
Message-ID: <jwvtvq5kuwh.fsf-monnier+bug#15687@HIDDEN>
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
 <b5e27e50-c5ea-45fb-a32c-024a83999254@default>
 <jwvmwkqncll.fsf-monnier+emacsbugs@HIDDEN>
 <631ec576-1143-4ee0-a399-39a3bc5bc7da@default>
 <g8mwkmxo5u.fsf@HIDDEN>
 <cf8c4472-512e-4296-a7be-aa4f7b63fc08@default>
 <56f34eec-57e4-43e7-b601-99ea8850d6e1@default>
Date: Thu, 14 Jun 2018 15:53:19 -0400
In-Reply-To: <56f34eec-57e4-43e7-b601-99ea8850d6e1@default> (Drew Adams's
 message of "Tue, 4 Nov 2014 19:48:09 -0800 (PST)")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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
 <1789687> : uri <2658220>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15687
Cc: 15687 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> This bug should not have been renamed from "custom themes: disabling does
> not restore initial configuration" to "disabling custom theme does not reset
> vars".
>
> It is *not about resetting variables*.  Not at all.
>
> It is about restoring any number of settings that might have been changed
> (including customized using Customize) prior to enabling the custom theme:
> faces, frame parameters, etc. - as explained in this bug thread.

We understand that.  We call that "resetting".


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 13 Jun 2018 16:41:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 13 12:41:33 2018
Received: from localhost ([127.0.0.1]:46814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fT8pw-0005Sr-SW
	for submit <at> debbugs.gnu.org; Wed, 13 Jun 2018 12:41:33 -0400
Received: from mail-wr0-f181.google.com ([209.85.128.181]:45666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1fT8pv-0005SW-9z
 for 15687 <at> debbugs.gnu.org; Wed, 13 Jun 2018 12:41:31 -0400
Received: by mail-wr0-f181.google.com with SMTP id o12-v6so3438453wrm.12
 for <15687 <at> debbugs.gnu.org>; Wed, 13 Jun 2018 09:41:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=tcd-ie.20150623.gappssmtp.com; s=20150623;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=B0txHFWDTjNJrOXyYwSHc9jfaelmHA37giQqqnyVaFE=;
 b=w5y56cnJx8fj4TlyqsU9acQoYJ7LmzpQ8pBIxpd7L8Af4j+duDo+n5OmlwpH1aN+hT
 DJa5ea0CzQ6W0VImpm41scLKvItrOS0GiPBElTwc+pCvWfS5m70AsJ8phy826ajL/FlB
 tnAgwlvO2MovvXRw+IgTTw06djl93tRTMlXRdxL7BpR5RStPFcZvdVSbmBgu27A4fkGj
 5hr2Kh6/tYM/OB3JbuBRIzyoIQL1SvtZuhAjSNC3I3l8O2wTEfGbFQAhiaiA1gp/ShBC
 e5LS48Xm5JBrjqH8D9tNis5jaupW3Hl/xTe7KaAJfxJLKfeBWJdwbS/bYQWynFDhrUIW
 Ks/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=B0txHFWDTjNJrOXyYwSHc9jfaelmHA37giQqqnyVaFE=;
 b=EXGfsGtwPLrYvT4yQrM2diipAUXutWnAN5jPVHD+s8RwzdoYPfZIoaK6ZjqH/C3NCX
 COgHzFTh6lOvaHmy7A++TB9qOv7fIc8aA9NrJ9A5nafzHnpIGuHoWMvLTHA71mPc7KeK
 aCgD2bZDFfO8nP4TkCki7UqRC1maUr+qf8l3ehjBojkjLSaFWZcqFI8qfKufBlfnLGJ9
 zIXqMfwaX7kqwxY0u1Fo4lCpvh6S7DnNXtOPxmL38EEVmrw1TzGMldzoURjbmAzDbFCS
 +uyfRHnX+Suh30/dq8vLGckdg7TFSk3LqjLAMMrb/TlHi/1MXcz8U+/XeY1DXEsJi9KQ
 afeg==
X-Gm-Message-State: APt69E0SeoH8CVjH1djDDyVorC8gaZmI/pClnraOUL9hFRAqIbmPKpnd
 vX86NJadNXxJ18L0Zr3kOdSy+g==
X-Google-Smtp-Source: ADUXVKKyxVPXNJqwsSDjjJBvBNAVpR68d3kcnRM2KdNTCQnH8qGKsZ9rw6ABn42vTVuvj91SZZzdww==
X-Received: by 2002:adf:cf0d:: with SMTP id
 o13-v6mr4649091wrj.112.1528908085299; 
 Wed, 13 Jun 2018 09:41:25 -0700 (PDT)
Received: from localhost (adsl-109.91.140.91.tellas.gr. [91.140.91.109])
 by smtp.gmail.com with ESMTPSA id b15-v6sm5344392wri.14.2018.06.13.09.41.24
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 13 Jun 2018 09:41:24 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#15687: 24.3.50;
 custom themes: disabling does not restore initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <87d2ln9f0b.fsf@HIDDEN>
 <e8fd319e-7f56-49ee-9a5f-93022c281740@default>
 <8761rf9ccv.fsf@HIDDEN>
 <6c0691be-bed5-4e0a-bc90-87a20ccef9c1@default>
 <87vb7mggo6.fsf@HIDDEN>
 <92900c1c-cf89-4679-8f16-4f8171607528@default>
Date: Wed, 13 Jun 2018 19:41:18 +0300
In-Reply-To: <92900c1c-cf89-4679-8f16-4f8171607528@default> (Drew Adams's
 message of "Fri, 25 Dec 2015 20:28:47 -0800 (PST)")
Message-ID: <87bmce1vwx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15687
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 15687 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

reopen 15687
quit

Drew Adams <drew.adams@HIDDEN> writes:

>> I give up.  If you want to remain convinced there is no problem,
>> fine.  If you don't want to even try to see the problems reported,
>> using the simple recipe I gave, fine.  (Yes, simple to do: download
>> the files, load them into emacs -Q, and try the command.  Maybe 3
>> minutes altogether, including the time to download.) ... there
>> seems to be little desire to fix the custom theme code in this
>> regard.  So be it.
>>
>> Ok; closing.
>
> There is nothing OK about closing this bug.  The bug clearly
> remains, and it is 100% reproducible.
>
> And users of custom themes keep getting tripped up by this
> problem.  A common, perhaps the most common, question about
> custom themes is how to completely undo one.  IOW, this bug.

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.  Wouldn't it be
less intrusive if they were reverted to the values they held before
enabling foo-theme, namely 'grave and "green", respectively?

Feel free to close this bug again if I've misunderstood something.

Thanks,

-- 
Basil

In GNU Emacs 27.0.50 (build 10, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-06-04 built on thunk
Repository revision: 1dafa4a02ed45bb4d02c6dc34c55518858422088
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux buster/sid




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.
bug unarchived. Request was from "Basil L. Contovounesios" <contovob@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 26 Dec 2015 04:28:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 25 23:28:56 2015
Received: from localhost ([127.0.0.1]:36626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aCgTQ-0002q7-DW
	for submit <at> debbugs.gnu.org; Fri, 25 Dec 2015 23:28:56 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:37920)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <drew.adams@HIDDEN>) id 1aCgTO-0002pv-Rv
 for 15687 <at> debbugs.gnu.org; Fri, 25 Dec 2015 23:28:55 -0500
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 tBQ4SlZp015422
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sat, 26 Dec 2015 04:28:48 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id tBQ4Slni002679
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sat, 26 Dec 2015 04:28:47 GMT
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id tBQ4Sk5Q029609;
 Sat, 26 Dec 2015 04:28:47 GMT
MIME-Version: 1.0
Message-ID: <92900c1c-cf89-4679-8f16-4f8171607528@default>
Date: Fri, 25 Dec 2015 20:28:47 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: RE: bug#15687: 24.3.50; custom themes: disabling does not restore
 initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <87d2ln9f0b.fsf@HIDDEN>
 <e8fd319e-7f56-49ee-9a5f-93022c281740@default>
 <8761rf9ccv.fsf@HIDDEN>
 <6c0691be-bed5-4e0a-bc90-87a20ccef9c1@default> <87vb7mggo6.fsf@HIDDEN>
In-Reply-To: <87vb7mggo6.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15687
Cc: 15687 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> I give up.  If you want to remain convinced there is no problem,
> fine.  If you don't want to even try to see the problems reported,
> using the simple recipe I gave, fine.  (Yes, simple to do: download
> the files, load them into emacs -Q, and try the command.  Maybe 3
> minutes altogether, including the time to download.) ... there
> seems to be little desire to fix the custom theme code in this
> regard.  So be it.
>
> Ok; closing.

There is nothing OK about closing this bug.  The bug clearly
remains, and it is 100% reproducible.

And users of custom themes keep getting tripped up by this
problem.  A common, perhaps the most common, question about
custom themes is how to completely undo one.  IOW, this bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.
bug closed, send any further explanations to 15687 <at> debbugs.gnu.org and Drew Adams <drew.adams@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 26 Dec 2015 01:09:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 25 20:09:08 2015
Received: from localhost ([127.0.0.1]:36398 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aCdM3-0008FE-T3
	for submit <at> debbugs.gnu.org; Fri, 25 Dec 2015 20:09:08 -0500
Received: from hermes.netfonds.no ([80.91.224.195]:44057)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <larsi@HIDDEN>) id 1aCdM1-0008F3-RR
 for 15687 <at> debbugs.gnu.org; Fri, 25 Dec 2015 20:09:06 -0500
Received: from 2.150.58.24.tmi.telenormobil.no ([2.150.58.24] helo=mouse)
 by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.72) (envelope-from <larsi@HIDDEN>)
 id 1aCdLf-00082x-2F; Sat, 26 Dec 2015 02:08:43 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#15687: 24.3.50;
 custom themes: disabling does not restore initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <87d2ln9f0b.fsf@HIDDEN>
 <e8fd319e-7f56-49ee-9a5f-93022c281740@default>
 <8761rf9ccv.fsf@HIDDEN>
 <6c0691be-bed5-4e0a-bc90-87a20ccef9c1@default>
Date: Sat, 26 Dec 2015 02:08:41 +0100
In-Reply-To: <6c0691be-bed5-4e0a-bc90-87a20ccef9c1@default> (Drew Adams's
 message of "Tue, 26 Nov 2013 13:16:21 -0800 (PST)")
Message-ID: <87vb7mggo6.fsf@HIDDEN>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-MailScanner-ID: 1aCdLf-00082x-2F
X-Netfonds-MailScanner: Found to be clean
X-Netfonds-MailScanner-From: larsi@HIDDEN
MailScanner-NULL-Check: 1451696923.83224@74gK11YpdS2xKfhdt3KQTg
X-Spam-Status: No
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15687
Cc: wgreenhouse@HIDDEN, 15687 <at> debbugs.gnu.org, wgg2@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Drew Adams <drew.adams@HIDDEN> writes:

> Alas, that code needs to remain, so far.  And apparently that will
> continue, as there seems to be little desire to fix the custom
> theme code in this regard.  So be it.

Ok; closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 5 Nov 2014 03:48:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 04 22:48:14 2014
Received: from localhost ([127.0.0.1]:49372 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XlrZt-000715-RM
	for submit <at> debbugs.gnu.org; Tue, 04 Nov 2014 22:48:14 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:41492)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1XlrZs-00070x-C6
 for 15687 <at> debbugs.gnu.org; Tue, 04 Nov 2014 22:48:12 -0500
Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 sA53mAmS020591
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
 for <15687 <at> debbugs.gnu.org>; Wed, 5 Nov 2014 03:48:11 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sA53m9CQ018276
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL)
 for <15687 <at> debbugs.gnu.org>; Wed, 5 Nov 2014 03:48:10 GMT
Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sA53m9Hd003326
 for <15687 <at> debbugs.gnu.org>; Wed, 5 Nov 2014 03:48:09 GMT
MIME-Version: 1.0
Message-ID: <56f34eec-57e4-43e7-b601-99ea8850d6e1@default>
Date: Tue, 4 Nov 2014 19:48:09 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: 15687 <at> debbugs.gnu.org
Subject: RE: bug#15687: 24.3.50; custom themes: disabling does not restore
 initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
 <b5e27e50-c5ea-45fb-a32c-024a83999254@default>
 <jwvmwkqncll.fsf-monnier+emacsbugs@HIDDEN>
 <631ec576-1143-4ee0-a399-39a3bc5bc7da@default>
 <g8mwkmxo5u.fsf@HIDDEN>
 <cf8c4472-512e-4296-a7be-aa4f7b63fc08@default>
In-Reply-To: <cf8c4472-512e-4296-a7be-aa4f7b63fc08@default>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2  (807160) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: ucsinet21.oracle.com [156.151.31.93]
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 15687
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.9 (--)

This bug should not have been renamed from "custom themes: disabling does n=
ot restore initial configuration" to "disabling custom theme does not reset=
 vars".

It is *not about resetting variables*.  Not at all.

It is about restoring any number of settings that might have been changed (=
including customized using Customize) prior to enabling the custom theme: f=
aces, frame parameters, etc. - as explained in this bug thread.

The point is that "disabling" a custom theme does not restore the pre-enabl=
ed state of everything that the theme changed.  Disabling only restores thi=
ngs relative to another custom theme.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 30 Nov 2013 17:10:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 30 12:10:29 2013
Received: from localhost ([127.0.0.1]:51937 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Vmo3o-0000dV-TR
	for submit <at> debbugs.gnu.org; Sat, 30 Nov 2013 12:10:29 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:22509)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Vmo3m-0000dH-Cb
 for 15687 <at> debbugs.gnu.org; Sat, 30 Nov 2013 12:10:27 -0500
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 rAUHAJ0S019757
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sat, 30 Nov 2013 17:10:20 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAUHAJrA020659
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Sat, 30 Nov 2013 17:10:19 GMT
Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAUHAIsJ017840;
 Sat, 30 Nov 2013 17:10:18 GMT
MIME-Version: 1.0
Message-ID: <cf8c4472-512e-4296-a7be-aa4f7b63fc08@default>
Date: Sat, 30 Nov 2013 09:10:16 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>, 15687 <at> debbugs.gnu.org
Subject: RE: bug#15687: 24.3.50; custom themes: disabling does not restore
 initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
 <b5e27e50-c5ea-45fb-a32c-024a83999254@default>
 <jwvmwkqncll.fsf-monnier+emacsbugs@HIDDEN>
 <631ec576-1143-4ee0-a399-39a3bc5bc7da@default>
 <g8mwkmxo5u.fsf@HIDDEN>
In-Reply-To: <g8mwkmxo5u.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15687
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> That is not a minimal recipe, that's "debug my code for me".

No one is asking anyone to debug my code.  The code works fine,
modulo Emacs bug #15687 and #15740.  And as I mentioned, the
code is for others, who use themes; I do not.  It is not I who
is hurt by this bug.  It is Emacs and its custom-theme users.
My aim is to help both.  If the bug report helps, fine; if not,
carry on.

I gave a simple recipe to _show the problem_.  I never claimed
that it is a minimal recipe.  I pointed to the specific code
that applies a theme and then (via C-g) tries to restore the
state.  And that code is very short and simple.

If you are not convinced that there is a problem restoring the
state as it was before applying a theme, then that quick
demonstration should convince you - without even looking at the
code - but especially if you do look at it.

After you downloaded the files "for laughs", did you even try
the theme cycling?  That's the point of downloading them, not
just to be able to laugh, poke fun, and complain about how much
you downloaded.  And that check takes only a few seconds.

Clearly, if your motivation in downloading the files was really
to look for the bug, you would at least have tried the command -
followed the recipe.  Why does my crystal ball tell me that you
didn't even try, that you just wanted to complain about how
much there was to download?

If you think that such restoration (theme undoing) is possible,
please let us know how.  (And no, `M-x customize*' is not the
answer.)  Let me put that to you positively and constructively:

How can one, with Emacs Lisp, restore the state that was in
effect before applying a custom theme?  How to _undo_ a theme
application?

Disabling a theme does not cut the mustard.  (If not convinced,
please do try the code you so patiently downloaded.  It clearly
disables all custom themes you enabled, when you hit C-g.)

The info of how to undo should be up front, in the manual.
It is not, and AFAICT it is not an accident that it is missing
altogether.  But if you know the answer, please, out with it.
In that case, this can be relegated to a doc bug, and you can
simply add that missing info to the manual to fix it.

The color-theme.el code and doc state clearly how to do that
with color themes (it is a trivial operation).  There is no
explanation of how to do that with custom themes.  Why is that?
AFAICT, there is nothing foreseen for doing that, even though it
is an obvious use case.

Is there a simple way to do it?  No answer.  If you claim there
is no bug here, please explain how that's done.  That should be
easy.  Presumably Emacs provides a simple way to do it, no?

Wrt the code to show the problem: I pointed to a simple cycling
command, whose code is short.  That should have been enough to
show, for instance, that it already does what wgreenhouse later
suggested:

 >> `disable-theme' should be called for every element in
 >> `custom-enabled-themes' before enabling a new one.

I nevertheless pointed out that the code does that:

(let ((orig-themes (delq nil (copy-sequence custom-enabled-themes)))
  ...
  (condition-case nil             ; `C-g'
      (progn (mapc #'disable-theme custom-enabled-themes)
             (if orig-themes
                 (mapc #'enable-theme orig-themes)
               (enable-theme snapshot)))
    (error nil)))

This clearly disables all enabled themes, and then enables any
themes that were enabled at the outset (i.e., were part of the
initial state).  Do you see something incorrect or missing here?

You do not need to look at 3000 lines of code to understand the
theme enabling and disabling being done.  Mauvaise foi.  And it
takes only a few seconds of trying the command to see that the
theme disabling is not enough to undo and restore the initial
state.

Keep your head in the sand and say you don't see anything.
Still, there is a bug.  Likewise, bug #15740.  If you want to
see it, raise your eyes.  If you don't want to see it, carry on.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 30 Nov 2013 08:57:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 30 03:57:22 2013
Received: from localhost ([127.0.0.1]:51115 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VmgMb-0004RR-OT
	for submit <at> debbugs.gnu.org; Sat, 30 Nov 2013 03:57:22 -0500
Received: from fencepost.gnu.org ([208.118.235.10]:36968 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rgm@HIDDEN>) id 1VmgMZ-0004QP-Ri
 for 15687 <at> debbugs.gnu.org; Sat, 30 Nov 2013 03:57:20 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
 (envelope-from <rgm@HIDDEN>)
 id 1VmgMX-0008Df-SM; Sat, 30 Nov 2013 03:57:18 -0500
From: Glenn Morris <rgm@HIDDEN>
To: 15687 <at> debbugs.gnu.org
Subject: Re: bug#15687: 24.3.50;
 custom themes: disabling does not restore initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
 <b5e27e50-c5ea-45fb-a32c-024a83999254@default>
 <jwvmwkqncll.fsf-monnier+emacsbugs@HIDDEN>
 <631ec576-1143-4ee0-a399-39a3bc5bc7da@default>
X-Spook: Forte bluebird CBNRC colonel threat supercomputer
X-Ran: "i*(ejmUyhCWzq^eg&0sjQ9mF?/Q^>L}T&1YXU3%xC;288Tw:lwGRA@>iBV}$RL`J2sqV,
X-Hue: red
X-Attribution: GM
Date: Sat, 30 Nov 2013 03:57:17 -0500
In-Reply-To: <631ec576-1143-4ee0-a399-39a3bc5bc7da@default> (Drew Adams's
 message of "Tue, 26 Nov 2013 12:44:28 -0800 (PST)")
Message-ID: <g8mwkmxo5u.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 15687
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Drew Adams wrote:

> I gave a recipe. I'll repeat it.
>
>  emacs -Q, load oneonone.el, then doremi.el and doremi-cmd.el.

For a laugh, I downloaded those. That's 3000 lines in total.
That is not a minimal recipe, that's "debug my code for me".
I don't have the time.
If you think this is important, please come up with a minimal recipe.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Nov 2013 21:17:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 16:17:03 2013
Received: from localhost ([127.0.0.1]:46487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VlQ0E-0000wG-RF
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 16:17:03 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57540)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VlQ0D-0000vk-29
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 16:17:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlPzx-0000vq-O6
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 16:16:55 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:44530)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlPzx-0000vj-KH
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 16:16:45 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58948)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlPzo-0001y9-Sp
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 16:16:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlPzg-0000oe-9v
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 16:16:36 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:38833)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlPzg-0000oW-4E
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 16:16:28 -0500
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 rAQLGPK6021137
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Tue, 26 Nov 2013 21:16:25 GMT
Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85])
 by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQLGMMw000842
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Tue, 26 Nov 2013 21:16:24 GMT
Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18])
 by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQLGMIY026934;
 Tue, 26 Nov 2013 21:16:22 GMT
MIME-Version: 1.0
Message-ID: <6c0691be-bed5-4e0a-bc90-87a20ccef9c1@default>
Date: Tue, 26 Nov 2013 13:16:21 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: wgreenhouse@HIDDEN
Subject: RE: 24.3.50; custom themes: disabling does not restore initial
 configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <87d2ln9f0b.fsf@HIDDEN>
 <e8fd319e-7f56-49ee-9a5f-93022c281740@default>
 <8761rf9ccv.fsf@HIDDEN>
In-Reply-To: <8761rf9ccv.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
Cc: "William G. Gardella" <wgg2@HIDDEN>, bug-gnu-emacs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

> To achieve a clean slate, `doremi-custom-themes[+]' should do
> exactly what `customize-themes' does: if
> `custom-theme-allow-multiple-selections' is nil, `disable-theme' should
> be called for every element in `custom-enabled-themes' before enabling a
> new one.

Did you look at the code?  What do you call this?

(let ((orig-themes (delq nil (copy-sequence custom-enabled-themes)))
  ...
  (condition-case nil             ; `C-g'
      (progn (mapc #'disable-theme custom-enabled-themes)
             (if orig-themes
                 (mapc #'enable-theme orig-themes)
               (enable-theme snapshot)))
    (error nil)))

> (customize-create-theme) is roughly equivalent to
> `color-theme-make-snapshot'.  It fills out a Custom theme using
> Emacs's current state as a basis.
...
> use (customize-create-theme) similarly to how you'd use
> (color-theme-make-snapshot) to make a point to reverse to.

No.  `customize-create-theme' opens Customize.  Show me a function
that takes a snapshot of the Emacs state, even as a custom theme,
which can then be used to restore the state.

I give up.  If you want to remain convinced there is no problem,
fine.  If you don't want to even try to see the problems reported,
using the simple recipe I gave, fine.  (Yes, simple to do: download
the files, load them into emacs -Q, and try the command.  Maybe 3
minutes altogether, including the time to download.)

I have no axe to grind about this, no dog in any race.  I provide
cycling commands for both color themes and custom themes.  And IF
it were true that the latter had no drawbacks wrt the former, I
would take pleasure in removing the code for color-theme cycling
(for Emacs versions that support custom themes).

Alas, that code needs to remain, so far.  And apparently that will
continue, as there seems to be little desire to fix the custom
theme code in this regard.  So be it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 26 Nov 2013 20:44:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 15:44:40 2013
Received: from localhost ([127.0.0.1]:46460 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VlPUt-000066-RV
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 15:44:40 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:46455)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VlPUr-00005s-73
 for 15687 <at> debbugs.gnu.org; Tue, 26 Nov 2013 15:44:37 -0500
Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 rAQKiUJh018325
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Tue, 26 Nov 2013 20:44:30 GMT
Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230])
 by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQKiTTI025875
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Tue, 26 Nov 2013 20:44:29 GMT
Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18])
 by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQKiTHW023815;
 Tue, 26 Nov 2013 20:44:29 GMT
MIME-Version: 1.0
Message-ID: <631ec576-1143-4ee0-a399-39a3bc5bc7da@default>
Date: Tue, 26 Nov 2013 12:44:28 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: RE: bug#15687: 24.3.50; custom themes: disabling does not restore
 initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
 <b5e27e50-c5ea-45fb-a32c-024a83999254@default>
 <jwvmwkqncll.fsf-monnier+emacsbugs@HIDDEN>
In-Reply-To: <jwvmwkqncll.fsf-monnier+emacsbugs@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet22.oracle.com [141.146.126.238]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15687
Cc: 15687 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> >> and the settings were apparently properly reset.  Do you have a recipe
> >> that triggers the problem?
> > You skipped the first part:
>=20
> Maybe I did, but I have a limited amount of time.  So if you don't want
> to give me an actual detailed recipe I can't help you.

I gave a recipe.  I'll repeat it.

 emacs -Q, load oneonone.el, then doremi.el and
 doremi-cmd.el.  Then cycle among themes, using `doremi-custom-themes+'.
 Use `C-g' to cancel.  The initial state is not restored.  Nothing
 close to it.  Not for any existing frames.

And I pointed clearly to a performance problem.  Which you can also
easily see using that recipe.  And if you want to see what happens
to performance if you allow theme accumulation, just set option
`doremi-custom-themes-accumulate-flag' to t.  Bonjour les degats.

And you have it wrong.  You are not helping me.  I am helping you
(Emacs).  Trying to, anyway.  Same reason I provide such theme-cycling
commands - to help those who actually use themes (color or custom).
I, myself, do not use them.  But I still try to get them to work well.
For others.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 26 Nov 2013 20:16:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 15:16:37 2013
Received: from localhost ([127.0.0.1]:46436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VlP3k-0007p4-ML
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 15:16:37 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:59625)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1VlP3i-0007oo-CD
 for 15687 <at> debbugs.gnu.org; Tue, 26 Nov 2013 15:16:35 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KEh/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCzQSFBgNJIgeBrEfkA6NGYNxA4hhnBmBXoMVgUg
X-IPAS-Result: Av8EABK/CFHO+KEh/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCzQSFBgNJIgeBrEfkA6NGYNxA4hhnBmBXoMVgUg
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="40460692"
Received: from 206-248-161-33.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.161.33])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 26 Nov 2013 15:16:28 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 33F3F60D32; Tue, 26 Nov 2013 15:16:28 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#15687: 24.3.50;
 custom themes: disabling does not restore initial configuration
Message-ID: <jwvmwkqncll.fsf-monnier+emacsbugs@HIDDEN>
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
 <b5e27e50-c5ea-45fb-a32c-024a83999254@default>
Date: Tue, 26 Nov 2013 15:16:28 -0500
In-Reply-To: <b5e27e50-c5ea-45fb-a32c-024a83999254@default> (Drew Adams's
 message of "Tue, 26 Nov 2013 06:05:21 -0800 (PST)")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 15687
Cc: 15687 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

>> and the settings were apparently properly reset.  Do you have a recipe
>> that triggers the problem?
> You skipped the first part:

Maybe I did, but I have a limited amount of time.  So if you don't want
to give me an actual detailed recipe I can't help you.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Nov 2013 19:45:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 14:45:23 2013
Received: from localhost ([127.0.0.1]:46385 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VlOZW-0006zg-Cz
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 14:45:22 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33072)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <wgreenhouse@HIDDEN>) id 1VlOZU-0006zT-Go
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 14:45:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <wgreenhouse@HIDDEN>) id 1VlOZK-00058E-9g
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 14:45:15 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,UNPARSEABLE_RELAY
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:47119)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <wgreenhouse@HIDDEN>) id 1VlOZK-00058A-7Q
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 14:45:10 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34784)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <wgreenhouse@HIDDEN>) id 1VlOZF-0001pk-Of
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 14:45:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <wgreenhouse@HIDDEN>) id 1VlOZB-0004rB-9O
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 14:45:05 -0500
Received: from mx1.riseup.net ([198.252.153.129]:38416)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <wgreenhouse@HIDDEN>) id 1VlOZB-0004qx-0v
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 14:45:01 -0500
Received: from fulvetta.riseup.net (fulvetta-pn.riseup.net [10.0.1.75])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net", Issuer "Gandi Standard SSL CA" (not verified))
 by mx1.riseup.net (Postfix) with ESMTPS id 8821D4B17B;
 Tue, 26 Nov 2013 11:44:57 -0800 (PST)
Received: from [127.0.0.1] (localhost [127.0.0.1])
 (Authenticated sender: wgreenhouse@HIDDEN)
 with ESMTPSA id EE35C180
From: wgreenhouse@HIDDEN (W. Greenhouse)
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: 24.3.50;
 custom themes: disabling does not restore initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <87d2ln9f0b.fsf@HIDDEN>
 <e8fd319e-7f56-49ee-9a5f-93022c281740@default>
Date: Tue, 26 Nov 2013 19:44:48 +0000
In-Reply-To: <e8fd319e-7f56-49ee-9a5f-93022c281740@default> (Drew Adams's
 message of "Tue, 26 Nov 2013 11:01:53 -0800 (PST)")
Message-ID: <8761rf9ccv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: clamav-milter 0.97.8 at mx1
X-Virus-Status: Clean
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.3 (----)
X-Debbugs-Envelope-To: submit
Cc: "William G. Gardella" <wgg2@HIDDEN>, bug-gnu-emacs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.3 (----)

Drew Adams <drew.adams@HIDDEN> writes:

> Please read the bug report.  It includes the case where all themes
> that have ever been applied have since been disabled.  That does not
> restore all other customizations that were in effect before theming.
> That's all.

I read the bug report in detail.  Despite its length, it failed to
provide a minimal recipe for reproducing the bug.  Without it, I
essentially had to read your mind.  What I have been able to discover on
my own is that Custom themes do not prevent you from easily and
completely restoring faces altered with M-x customize.  I was able to do
so in my example.

> If you need a recipe, emacs -Q, load oneonone.el, then doremi.el and
> doremi-cmd.el.  Then cycle among themes, using `doremi-custom-themes+'.
> Use `C-g' to cancel.  The initial state is not restored.  Nothing
> close to it.  Not for any existing frames.

Since I was able to revert in the same frame completely without these
libraries, I think the problem lies not in the implementation of Custom
themes but rather the implementation for changing them in these
libraries.  To achieve a clean slate, `doremi-custom-themes' should do
exactly what `customize-themes' does: if
`custom-theme-allow-multiple-selections' is nil, `disable-theme' should
be called for every element in `custom-enabled-themes' before enabling a
new one.

> Sure, if you then create a new frame, things will look generally OK
> in that frame.  But the state of any existing frames has been altered
> and not restored.  Disabling a theme does not undo its effect wrt
> Emacs in general.  It simply disables one theme wrt other themes
> (including wrt all other themes).

Disabling a theme undoes its effect with respect to any setting made
through M-x customize.

> In addition, I see no way to take a snapshot of the current Emacs
> state as a theme, or even as a pseudo theme, to which one can revert.

(customize-create-theme) is roughly equivalent to
`color-theme-make-snapshot'.  It fills out a Custom theme using Emacs's
current state as a basis.

> This is something that is trivial with color themes - just call
> `color-theme-make-snapshot'.
>
> Try the same thing, but with command `doremi-color-themes+'.
> No problem.

As I alluded to in the last post, I think the problem lies in UI and
user expectations rather than underlying implementation.  I was never
able to get color-theme.el themes to undo themselves cleanly, because I
hadn't discovered `color-theme-make-snapshot' or your functions taking
advantage of it.

As far as I can determine from testing from emacs -Q, Custom themes
adhere to what (info "(emacs) Custom Themes") says they adhere to:

>    Any customizations that you make through the customization buffer
> take precedence over theme settings.  This lets you easily override
> individual theme settings that you disagree with.  If settings from two
> different themes overlap, the theme occurring earlier in
> `custom-enabled-themes' takes precedence.  In the customization buffer,
> if a setting has been changed from its default by a Custom theme, its
> `State' display shows `THEMED' instead of `STANDARD'.

Stuff set through Customize (whether before or after loading Custom
themes) survives enabling a theme, and those customizations will still
be there when any/all themes are disabled.  And in my own setup, which
is fairly complicated (an Emacs that's also subject to ~/.Xresources
theming as well as theming by elisp), frames do "return to normal" when
all themes are disabled.

I don't think Custom themes guarantee anything for settings made
otherwise than through M-x customize; for that case you could use
(customize-create-theme) similarly to how you'd use
(color-theme-make-snapshot) to make a point to reverse to.

--
Best,
WGG




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Nov 2013 19:02:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 14:02:33 2013
Received: from localhost ([127.0.0.1]:46322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VlNu4-0005qr-RS
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 14:02:33 -0500
Received: from eggs.gnu.org ([208.118.235.92]:52907)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VlNu2-0005qf-Kj
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 14:02:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlNtn-0000jg-76
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 14:02:25 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:52819)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlNtn-0000jc-40
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 14:02:15 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54505)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlNte-0006DV-Hp
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 14:02:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlNtW-0000dq-08
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 14:02:06 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:27968)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VlNtV-0000dl-P2
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 14:01:57 -0500
Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93])
 by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 rAQJ1ti4026485
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Tue, 26 Nov 2013 19:01:56 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQJ1s5j017403
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Tue, 26 Nov 2013 19:01:55 GMT
Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQJ1sUr008856;
 Tue, 26 Nov 2013 19:01:54 GMT
MIME-Version: 1.0
Message-ID: <e8fd319e-7f56-49ee-9a5f-93022c281740@default>
Date: Tue, 26 Nov 2013 11:01:53 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: "William G. Gardella" <wgg2@HIDDEN>
Subject: RE: 24.3.50; custom themes: disabling does not restore initial
 configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <87d2ln9f0b.fsf@HIDDEN>
In-Reply-To: <87d2ln9f0b.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: ucsinet21.oracle.com [156.151.31.93]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
Cc: bug-gnu-emacs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Please read the bug report.  It includes the case where all themes
that have ever been applied have since been disabled.  That does not
restore all other customizations that were in effect before theming.
That's all.

If you need a recipe, emacs -Q, load oneonone.el, then doremi.el and
doremi-cmd.el.  Then cycle among themes, using `doremi-custom-themes+'.
Use `C-g' to cancel.  The initial state is not restored.  Nothing
close to it.  Not for any existing frames.

Sure, if you then create a new frame, things will look generally OK
in that frame.  But the state of any existing frames has been altered
and not restored.  Disabling a theme does not undo its effect wrt
Emacs in general.  It simply disables one theme wrt other themes
(including wrt all other themes).

In addition, I see no way to take a snapshot of the current Emacs
state as a theme, or even as a pseudo theme, to which one can revert.

This is something that is trivial with color themes - just call
`color-theme-make-snapshot'.

Try the same thing, but with command `doremi-color-themes+'.
No problem.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Nov 2013 18:48:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 13:48:05 2013
Received: from localhost ([127.0.0.1]:46295 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VlNg4-0005TN-LP
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 13:48:04 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50306)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <wgg2@HIDDEN>) id 1VlNg3-0005St-1M
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 13:48:03 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <wgg2@HIDDEN>) id 1VlNft-0004sq-34
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 13:47:57 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,UNPARSEABLE_RELAY
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:57263)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <wgg2@HIDDEN>) id 1VlNfs-0004se-WE
 for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 13:47:53 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51930)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <wgg2@HIDDEN>) id 1VlNfo-0001ri-Fo
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 13:47:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <wgg2@HIDDEN>) id 1VlNfg-0004pa-K5
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 13:47:48 -0500
Received: from mx1.riseup.net ([198.252.153.129]:51228)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <wgg2@HIDDEN>) id 1VlNfg-0004pK-Eb
 for bug-gnu-emacs@HIDDEN; Tue, 26 Nov 2013 13:47:40 -0500
Received: from fruiteater.riseup.net (fruiteater-pn.riseup.net [10.0.1.74])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net", Issuer "Gandi Standard SSL CA" (not verified))
 by mx1.riseup.net (Postfix) with ESMTPS id 37E8F4AF73;
 Tue, 26 Nov 2013 10:47:39 -0800 (PST)
Received: from [127.0.0.1] (localhost [127.0.0.1])
 (Authenticated sender: wgreenhouse@HIDDEN)
 with ESMTPSA id C480B7EC
From: "William G. Gardella" <wgg2@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: 24.3.50;
 custom themes: disabling does not restore initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
Date: Tue, 26 Nov 2013 18:47:32 +0000
In-Reply-To: <a8821acb-dd94-4357-a671-5abe2c01d54f@default> (Drew Adams's
 message of "Tue, 22 Oct 2013 13:55:03 -0700 (PDT)")
Message-ID: <87d2ln9f0b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: clamav-milter 0.97.8 at mx1
X-Virus-Status: Clean
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: bug-gnu-emacs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Drew Adams <drew.adams@HIDDEN> writes:

> AFAICT, there is no equivalent of such a snapshot with custom themes,
> and it's not clear how to create one.  But please prove me wrong.

Sure.  Follow this recipe:

1) Execute "emacs -Q".

2) Customize some face.  I did M-x customize-face
   font-lock-comment-face, changing the foreground color to magenta and
   clicking "Apply."  As expected, the initial comment in the *scratch*
   buffer is now magenta.  But the choice of face doesn't really matter,
   this works with any face I tried (font-lock-builtin-face,
   font-lock-keyword-face, font-lock-function-name-face, etc.).

3) M-x customize-themes.  Choose any face you like, for example
   `manoj-dark'.  Look at the *scratch* buffer.

4) Choose another theme via M-x customize-themes.  Look at the *scratch*
   buffer.

5) Uncheck the theme checked in M-x customize-themes.  Look at the
   *scratch* buffer.

Customizeations made outside Custom themes using Customize are entirely
reversible, to the pre-themed state.

I think the confusion here--and the bug, if any--is one of user
interface and user expectations.  `load-theme', `enable-theme',
`disable-theme' et al. normally operate on one theme at a time, without
reverting all themes.  This is perhaps not such a sane default.
However, `customize-themes' disables any other active themes unless the

> [ ] Select more than one theme at a time

checkbox is checked.  Perhaps enable-theme, disable-theme etc. should
adhere to the same default, leaving at most one theme (or the pre-theme
settings) enabled at a time.

--
Best,
WGG




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 26 Nov 2013 14:08:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 09:08:25 2013
Received: from localhost ([127.0.0.1]:45571 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VlJJR-0005bU-Cj
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 09:08:25 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:28983)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VlJJP-0005bH-TW
 for 15687 <at> debbugs.gnu.org; Tue, 26 Nov 2013 09:08:24 -0500
Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 rAQE8HtY005019
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Tue, 26 Nov 2013 14:08:18 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQE8HZp013424
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Tue, 26 Nov 2013 14:08:17 GMT
Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQE8HG1013408;
 Tue, 26 Nov 2013 14:08:17 GMT
MIME-Version: 1.0
Message-ID: <ff2d5817-11f3-48c7-8569-9296dc3d2adf@default>
Date: Tue, 26 Nov 2013 06:08:16 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: RE: bug#15687: 24.3.50; custom themes: disabling does not restore
 initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
In-Reply-To: <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet22.oracle.com [141.146.126.238]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15687
Cc: 15687 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> retitle 15687 Disabling custom theme does not reset vars
> thanks

Oh, and this should really not have been so retitled.  Please see
the bug report.  This is about restoring the configuration before
switching to a theme.  It is not just about variables.

(Probably "initial configuration" in the original title is
misleading.  I meant initial in the sense of before applying
a theme, not in the sense of initial Emacs state: emacs -Q.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 26 Nov 2013 14:05:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 09:05:35 2013
Received: from localhost ([127.0.0.1]:45566 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VlJGg-0005WY-DQ
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2013 09:05:35 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:32633)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VlJGd-0005WK-PL
 for 15687 <at> debbugs.gnu.org; Tue, 26 Nov 2013 09:05:32 -0500
Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])
 by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 rAQE5N2c007183
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Tue, 26 Nov 2013 14:05:25 GMT
Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85])
 by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQE5M9A002947
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Tue, 26 Nov 2013 14:05:22 GMT
Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18])
 by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQE5Lst022332;
 Tue, 26 Nov 2013 14:05:21 GMT
MIME-Version: 1.0
Message-ID: <b5e27e50-c5ea-45fb-a32c-024a83999254@default>
Date: Tue, 26 Nov 2013 06:05:21 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: RE: bug#15687: 24.3.50; custom themes: disabling does not restore
 initial configuration
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
 <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
In-Reply-To: <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet22.oracle.com [141.146.126.238]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15687
Cc: 15687 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> > You enable a custom theme.  Then you disable it.  The settings remain
> > those of the "disabled" custom theme.  Your initial state is not
> > restored.
>=20
> I tried
>=20
>    emacs -Q
>    M-x custom-themes RET
>    RET on the first theme to enable it
>    RET again to disable it
>=20
> and the settings were apparently properly reset.  Do you have a recipe
> that triggers the problem?

You skipped the first part:

 You start out with Emacs in your preferred customized state, a
 result perhaps of multiple option settings, frame parameter settings,
 face settings, etc.  For example, you have used `default-frame-alist'
 and customized some particular faces.  No custom theme (except `user')
 has been applied.

A demonstration that disabling a custom-theme can put you back to the
emacs -Q state is not too surprising.  What's missing is the ability
to put you back to anything close to the pre-theme state (i.e., as
much as possible), whatever that customized state might have been.

Of course, that state is not *automatically* recorded anywhere.
What's really missing, AFAICT, is the ability to take a snapshot of
the state, which can then be restored at any time.  As the bug says:

 AFAICT, there is no equivalent of such a snapshot with custom
 themes, and it's not clear how to create one.  But please prove me
 wrong.

 In particular, all of the custom-theme code requires a theme
 argument, which must be defined fully, including actually having been
 written to a theme file.  Hardly something that facilitates dynamic
 state recording and reverting.

See the full description of the bug.  And see the treatment in
color-theme.el (not my library, BTW).  There, you can take such a
snapshot at any time.  And it serves, in effect, more or less as a
theme (a pseudo theme).

As the bug report says:

 However, I do not see, for custom themes, what is an
 important feature of `color-theme.el': the ability to take a snapshot
 of the current settings (independent of how they were set, whether
 via themes or not) as something that can function as a (pseudo)theme.

Compare these commands, which cycle among themes:

1. In doremi-cmd.el: `doremi-custom-themes+' vs `doremi-color-themes+'.
2. In icicles-cmd1.el: `icicle-custom-theme' vs `icicle-color-theme'.

From the doc string of `icicle-color-theme', this part about undoing:

 If you use `C-g' during this command, the previous color-theme
 snapshot is used to restore that color theme.

 Remember too that you can use the pseudo-theme [Reset] to restore the
 last theme: `M-x color-theme-select [Reset]'.

 By default, each time you invoke this command, a snapshot is first
 made of the current color theme (or current colors, if no theme is
 used).  Thus, by default, if you use `C-g', the colors restored are
 those used before you changed themes using this command.

 However, if you use a prefix arg, then this command takes no new
 snapshot, unless no snapshot has ever been taken during this Emacs
 session.  This can be useful when experimenting, to restore not to
 the state just before this command invocation, but to some previous
 snapshot.

That part about the pseudo-them [Reset] is straight color-theme.el.
It has nothing to do with Icicles.  See color-theme.el for info
about such a snapshot.

From the doc string of `icicle-custom-theme', by contrast:

 You can use `C-g' to quit and cancel changes by the command.  Note,
 however, that some things might not be restored.  `C-g' can only
 disable any themes that you applied.  It cannot restore other
 customizations that enabling a theme might have overruled.  This is
 a limitation of Emacs custom themes: you can disable them, but you
 cannot restore non-theme settings in effect before enabling a theme.
 Color themes (and command `icicle-color-theme') do not have this
 limitation.

From the doc string of `doremi-color-themes+':

 You can use `C-g' to quit and cancel changes made so far.
 Alternatively, after using `doremi-color-themes+' you can use
 `color-theme-select' and choose pseudo-theme `[Reset]' - that does
 the same thing.  Note that in either case, some things might not
 be restored.

From the doc string of `doremi-custom-themes+':

 You can use `C-g' to quit and cancel changes made so far.  Note,
 however, that some things might not be restored.  `C-g' can only
 disable any themes that you applied.  It cannot restore other
 customizations that enabling a theme might have overruled.

----

An additional problem with custom themes, compared with color
themes, is that when multiple frames are present things become
extremely slow (maybe exponentially wrt the number of frames?
dunno).

This alone makes cycling among custom themes almost unusable
when there are multiple frames.

And this is the case even when, as is done for these cycling
commands, accumulation of custom themes is turned off.  If, on
the other hand, accumulation is allowed (the normal case for
custom themes), then things really grind to a halt.

A guess would be that this might be because custom themes record
more information than color themes.  But why this would make such
a difference, and why it might be related to the number of frames
in such a marked way, I have no idea.

If you want to see the difference, just try, say,
`doremi-custom-themes+' compared with `doremi-color-themes+',
with several frames open.  You need only the files doremi.el and
doremi-cmd.el to try that.  Both are on MELPA and on Emacs Wiki
(as are the Icicles files).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.
Changed bug title to 'Disabling custom theme does not reset vars' from '24.3.50; custom themes: disabling does not restore initial configuration' Request was from Stefan Monnier <monnier@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15687 <at> debbugs.gnu.org:


Received: (at 15687) by debbugs.gnu.org; 26 Nov 2013 02:15:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 25 21:15:06 2013
Received: from localhost ([127.0.0.1]:45220 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Vl8B7-0001kW-8A
	for submit <at> debbugs.gnu.org; Mon, 25 Nov 2013 21:15:05 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:20360)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>)
 id 1Vl8B4-0001ji-Jb; Mon, 25 Nov 2013 21:15:03 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxIQK/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA4hhnBmBXoMV
X-IPAS-Result: Av8EABK/CFFFxIQK/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA4hhnBmBXoMV
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="40393812"
Received: from 69-196-132-10.dsl.teksavvy.com (HELO pastel.home)
 ([69.196.132.10])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 25 Nov 2013 21:14:56 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 6689A60A40; Mon, 25 Nov 2013 21:14:56 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#15687: 24.3.50;
 custom themes: disabling does not restore initial configuration
Message-ID: <jwv8uwbrjyx.fsf-monnier+bug#15687@HIDDEN>
References: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
Date: Mon, 25 Nov 2013 21:14:56 -0500
In-Reply-To: <a8821acb-dd94-4357-a671-5abe2c01d54f@default> (Drew Adams's
 message of "Tue, 22 Oct 2013 13:55:03 -0700 (PDT)")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 15687
Cc: 15687 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

retitle 15687 Disabling custom theme does not reset vars
thanks

> You enable a custom theme.  Then you disable it.  The settings remain
> those of the "disabled" custom theme.  Your initial state is not
> restored.

I tried

   emacs -Q
   M-x custom-themes RET
   RET on the first theme to enable it
   RET again to disable it

and the settings were apparently properly reset.  Do you have a recipe
that triggers the problem?


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Oct 2013 20:56:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 22 16:56:00 2013
Received: from localhost ([127.0.0.1]:35987 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VYizf-0001uq-I3
	for submit <at> debbugs.gnu.org; Tue, 22 Oct 2013 16:56:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37277)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VYizc-0001uZ-0K
 for submit <at> debbugs.gnu.org; Tue, 22 Oct 2013 16:55:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VYizM-0006CG-Eu
 for submit <at> debbugs.gnu.org; Tue, 22 Oct 2013 16:55:50 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43421)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VYizM-0006CB-Al
 for submit <at> debbugs.gnu.org; Tue, 22 Oct 2013 16:55:40 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38937)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VYizD-00008F-Jb
 for bug-gnu-emacs@HIDDEN; Tue, 22 Oct 2013 16:55:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VYiz4-0005v3-4h
 for bug-gnu-emacs@HIDDEN; Tue, 22 Oct 2013 16:55:31 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:19489)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VYiz3-0005th-T7
 for bug-gnu-emacs@HIDDEN; Tue, 22 Oct 2013 16:55:22 -0400
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
 by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 r9MKtKC7022640
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Tue, 22 Oct 2013 20:55:21 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9MKtJDM006094
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
 for <bug-gnu-emacs@HIDDEN>; Tue, 22 Oct 2013 20:55:20 GMT
Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9MKtJQf018536
 for <bug-gnu-emacs@HIDDEN>; Tue, 22 Oct 2013 20:55:19 GMT
MIME-Version: 1.0
Message-ID: <a8821acb-dd94-4357-a671-5abe2c01d54f@default>
Date: Tue, 22 Oct 2013 13:55:03 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; custom themes: disabling does not restore initial
 configuration
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)


Dunno whether this is a bug or a missing feature (enhancement request).

Custom themes were presumably inspired from the color themes of library
`color-theme.el'.  However, I do not see, for custom themes, what is an
important feature of `color-theme.el': the ability to take a snapshot of
the current settings (independent of how they were set, whether via
themes or not) as something that can function as a (pseudo)theme.

Here is a use case.  You tell me whether custom themes offer something
in this regard.

You start out with Emacs in your preferred customized state, a result
perhaps of multiple option settings, frame parameter settings, face
settings, etc.  For example, you have used `default-frame-alist' and
customized some particular faces.  No custom theme (except `user') has
been applied.

You enable a custom theme.  Then you disable it.  The settings remain
those of the "disabled" custom theme.  Your initial state is not
restored.

It seems that disabling a theme is only relative to other custom themes.
Disabling does not undo the effect upon Emacs of enabling (in which case
it is a misnomer).  Enabling not only makes a theme current but also
changes variable values, face settings, frame parameters etc., but none
of that is part of disabling, except in so far as it affects or is
affected by other custom themes.  The ex-theme state of Emacs is ignored
wrt both enabling and disabling.  There is no record of anything to
restore.

A more precise use case: As above, but you cycle among a set of custom
themes.  You want C-g during the cycling to cancel (i.e., undo) all
effects, restoring the initial state because you decided not to use any
theme.  With `color-theme.el' this was trivial to do: just take a
(pseudotheme) snapshot before cycling, and then restore the snapshot
upon C-g.

AFAICT, there is no equivalent of such a snapshot with custom themes,
and it's not clear how to create one.  But please prove me wrong.

In particular, all of the custom-theme code requires a theme argument,
which must be defined fully, including actually having been written to a
theme file.  Hardly something that facilitates dynamic state recording
and reverting.

Please let me know if I'm missing something.  If not already available,
please provide such a useful feature: the ability to record settings as
a (pseudo)theme that is not full-blown, e.g., is not associated with a
theme file etc.

If necessary, it would be OK if the function to create such a snapshot
pseudotheme specified the particular settings to record.  Another
possibility would be to record not the current dynamic Emacs state but
the user's initial state as defined by the `custom-set-variables' and
`custom-set-faces' sexps in `(or custom-file user-init-file)'.


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-10-19 on LEG570
Bzr revision: 114715 rgm@HIDDEN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG=
=3D1'




Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#15687; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 10 Jan 2019 19:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.