From: Drew Adams <drew.adams@oracle.com>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: Eli Zaretskii <eliz@gnu.org>, dancol@dancol.org, emacs-devel@gnu.org
Subject: RE: Disabling custom themes (was: Why is custom--inhibit-theme-enable not t by default?)
Date: Wed, 13 Jun 2018 10:16:33 -0700 (PDT) [thread overview]
Message-ID: <dd9aa3d1-9122-44a3-ad5e-efea84bc01b1@default> (raw)
In-Reply-To: <87602m1v94.fsf_-_@tcd.ie>
> Sorry, I'm not sure I completely understand what you mean (for example
> w.r.t. "initial state" and "settings of the 'disabled' custom theme"),
> but I've posted a recipe with what I think you're getting at to
> bug#15687, where I think any further discussion of the effects of theme
> disabling can be continued.
>
> Either way, thanks for the explanation and background.
Thanks for reopening bug #15687. And from your post there
I think you have understood.
To try to clarify -
I mean only that custom-theme enabling/disabling knows only
about (custom) themes. It does not know about other user
customizations, so it cannot restore them when it is disabled.
What's missing is a function that captures the state of Emacs
(anything that a custom state might modify) before any custom
theme is applied, so that that state can be restored.
Then you could (as you can with color themes) invoke that
function to take a snapshot of your Emacs before "theming",
and you could use that snapshot to restore your Emacs pretty
much as it was before "theming".
It's easy to understand if you look at what's possible with
color themes. There, you can create a color theme (kind of
a pseudo-theme, actually) at the outset, which records the
current Emacs state as a snapshot, i.e., anything that might
be recorded in a color theme. To restore the initial state
you need only apply that (pseudo) color theme. Voila: back
to what you started with, as much as is practicable.
With custom themes, if the initial state before applying
a custom theme has non-default frame parameters, faces, etc.,
and if you enable and then disable a custom theme, those user
customizations are lost - not restored. You need to quit
Emacs and restart it to get them back - and that works only
if you saved those (non-theme) customizations.
That's all. If you start by applying a custom theme to a
virgin (`emacs -Q') session then you likely won't see the
problem. But if you start from a customized Emacs you can.
The use case is someone who has a customized Emacs (with
those customizations saved or not), and who wants to try on
some themes, to see what they look/act like. S?he can cycle
among themes, trying them on one after another. But s?he
cannot get back to what s?he started with.
Why? Because there is no custom theme that captures that
initial state, and disabling a custom theme just does so
relative to other custom themes. The initial, default
custom theme, called `user', is not a snapshot of the
user's actual customizations (faces etc.).
next prev parent reply other threads:[~2018-06-13 17:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 4:14 Why is custom--inhibit-theme-enable not t by default? dancol
2018-06-12 15:23 ` Eli Zaretskii
2018-06-12 15:42 ` dancol
2018-06-12 16:37 ` Eli Zaretskii
[not found] ` <<83vaao3qrn.fsf@gnu.org>
2018-06-12 19:54 ` Drew Adams
2018-06-13 13:47 ` Basil L. Contovounesios
2018-06-13 14:22 ` Drew Adams
2018-06-13 16:55 ` Disabling custom themes (was: Why is custom--inhibit-theme-enable not t by default?) Basil L. Contovounesios
2018-06-13 17:16 ` Drew Adams [this message]
2018-06-13 17:21 ` Disabling custom themes Eric Abrahamsen
2018-06-13 17:30 ` Daniel Colascione
2018-06-14 2:34 ` Why is custom--inhibit-theme-enable not t by default? Richard Stallman
2018-06-14 3:26 ` Stefan Monnier
2018-06-14 14:21 ` Drew Adams
2018-06-14 18:02 ` Stefan Monnier
2018-06-14 18:16 ` Drew Adams
2018-06-14 18:30 ` Stefan Monnier
2018-06-14 18:41 ` Basil L. Contovounesios
2018-06-14 20:09 ` Stefan Monnier
2018-06-13 14:01 ` Basil L. Contovounesios
2018-06-17 21:31 ` Andy Moreton
2018-06-18 14:07 ` Andy Moreton
2018-06-19 14:49 ` Daniel Colascione
2018-06-12 18:24 ` Basil L. Contovounesios
2018-06-13 2:16 ` Richard Stallman
2018-06-13 13:56 ` Basil L. Contovounesios
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd9aa3d1-9122-44a3-ad5e-efea84bc01b1@default \
--to=drew.adams@oracle.com \
--cc=contovob@tcd.ie \
--cc=dancol@dancol.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).