all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 15687@debbugs.gnu.org
Subject: bug#15687: 24.3.50; custom themes: disabling does not restore initial configuration
Date: Tue, 22 Oct 2013 13:55:03 -0700 (PDT)	[thread overview]
Message-ID: <a8821acb-dd94-4357-a671-5abe2c01d54f@default> (raw)


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@gnu.org-20131019023520-s8mwtib7xcx9e05w
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'





             reply	other threads:[~2013-10-22 20:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 20:55 Drew Adams [this message]
2013-11-26  2:14 ` bug#15687: 24.3.50; custom themes: disabling does not restore initial configuration Stefan Monnier
2013-11-26 14:05   ` Drew Adams
2013-11-26 20:16     ` Stefan Monnier
2013-11-26 20:44       ` Drew Adams
2013-11-30  8:57         ` Glenn Morris
2013-11-30 17:10           ` Drew Adams
2014-11-05  3:48             ` Drew Adams
2018-06-14 19:53               ` Stefan Monnier
2013-11-26 14:08   ` Drew Adams
2013-11-26 18:47 ` William G. Gardella
2013-11-26 19:01   ` Drew Adams
2013-11-26 19:44     ` W. Greenhouse
2013-11-26 21:16       ` Drew Adams
2015-12-26  1:08         ` Lars Ingebrigtsen
2015-12-26  4:28           ` Drew Adams
2018-06-13 16:41             ` Basil L. Contovounesios
2018-06-14 20:03               ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8821acb-dd94-4357-a671-5abe2c01d54f@default \
    --to=drew.adams@oracle.com \
    --cc=15687@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.