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

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 22 Oct 2013 20:56:01 UTC

Severity: normal

Tags: fixed

Merged with 34027

Found in versions 24.3.50, 27.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: wgreenhouse <at> riseup.net
Cc: wgg2 <at> member.fsf.org, 15687 <at> debbugs.gnu.org
Subject: bug#15687: 24.3.50; custom themes: disabling does not restore initial configuration
Date: Tue, 26 Nov 2013 13:16:21 -0800 (PST)
> 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.




This bug report was last modified 4 years and 260 days ago.

Previous Next


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