* Why do themes stack?
@ 2015-01-31 12:54 Tory S. Anderson
2015-01-31 13:16 ` Rasmus
2015-01-31 13:56 ` Artur Malabarba
0 siblings, 2 replies; 5+ messages in thread
From: Tory S. Anderson @ 2015-01-31 12:54 UTC (permalink / raw)
To: emacs list
Throughout my work day I'll switch themes now and again to go from high contrast to lower, or from dark to light. This process requires disabling the present theme and then loading the next theme; if you forget to disable, the themes stack, usually with undesirable consequences.
Why is it implemented this way? Does anyone out there actually gain utility from theme stacking? Or am I doing something wrong? I would think the simpler implementation would simply to have "load theme" automatically disable the present theme, which is both conceptually and pragmatically easier. But the manual doesn't seem to mention much about themes, so I haven't found an explanation (or possible use) for this stacking implementation.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Why do themes stack?
2015-01-31 12:54 Why do themes stack? Tory S. Anderson
@ 2015-01-31 13:16 ` Rasmus
2015-01-31 13:37 ` Tory S. Anderson
2015-01-31 13:56 ` Artur Malabarba
1 sibling, 1 reply; 5+ messages in thread
From: Rasmus @ 2015-01-31 13:16 UTC (permalink / raw)
To: help-gnu-emacs
torys.anderson@gmail.com (Tory S. Anderson) writes:
> Why is it implemented this way? Does anyone out there actually gain
> utility from theme stacking? Or am I doing something wrong? I would
> think the simpler implementation would simply to have "load theme"
> automatically disable the present theme, which is both conceptually
> and pragmatically easier. But the manual doesn't seem to mention much
> about themes, so I haven't found an explanation (or possible use) for
> this stacking implementation.
Some people use it for overlaying themes on top of the default theme,
e.g. for different.
You could just do something like this, I guess:
(defun my/load-theme ()
"call load-theme, but disable all themes first"
(interactive)
(call-interactively 'load-theme)
(mapc 'disable-theme (cdr-safe custom-enabled-themes)))
--
A clever person solves a problem. A wise person avoids it
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Why do themes stack?
2015-01-31 13:16 ` Rasmus
@ 2015-01-31 13:37 ` Tory S. Anderson
0 siblings, 0 replies; 5+ messages in thread
From: Tory S. Anderson @ 2015-01-31 13:37 UTC (permalink / raw)
To: Rasmus; +Cc: help-gnu-emacs
Thanks for the snippet; that's useful.
I guess I have yet to imagine someone who wants to mix their paints manually, so to speak, rather than just putting them in a bottle (making a custom theme).
Rasmus <rasmus@gmx.us> writes:
> torys.anderson@gmail.com (Tory S. Anderson) writes:
>
>> Why is it implemented this way? Does anyone out there actually gain
>> utility from theme stacking? Or am I doing something wrong? I would
>> think the simpler implementation would simply to have "load theme"
>> automatically disable the present theme, which is both conceptually
>> and pragmatically easier. But the manual doesn't seem to mention much
>> about themes, so I haven't found an explanation (or possible use) for
>> this stacking implementation.
>
> Some people use it for overlaying themes on top of the default theme,
> e.g. for different.
>
> You could just do something like this, I guess:
>
> (defun my/load-theme ()
> "call load-theme, but disable all themes first"
> (interactive)
> (call-interactively 'load-theme)
> (mapc 'disable-theme (cdr-safe custom-enabled-themes)))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Why do themes stack?
2015-01-31 12:54 Why do themes stack? Tory S. Anderson
2015-01-31 13:16 ` Rasmus
@ 2015-01-31 13:56 ` Artur Malabarba
2015-01-31 14:32 ` Tory S. Anderson
1 sibling, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-01-31 13:56 UTC (permalink / raw)
To: Tory S. Anderson; +Cc: help-gnu-emacs
Because then you can have different themes which apply to different faces.
For instance, if you really like Magit you could release a theme that only
customizes Magit faces.
If themes didn't stack, nobody would ever use your theme because it doesn't
do anything outside Magit buffers. Since themes DO stack, users can use
your theme in addition to their global theme. This way, people get all the
Magit-dedicated love of your theme while still having another nice theme
everywhere else.
The fact that extremely few special themes like this exist is a shame. It
increases confusion on the users, and increases pressure on the theme
developers to support every single major-mode under the sun.
On 31 Jan 2015 12:54, "Tory S. Anderson" <torys.anderson@gmail.com> wrote:
> Throughout my work day I'll switch themes now and again to go from high
> contrast to lower, or from dark to light. This process requires disabling
> the present theme and then loading the next theme; if you forget to
> disable, the themes stack, usually with undesirable consequences.
>
> Why is it implemented this way? Does anyone out there actually gain
> utility from theme stacking? Or am I doing something wrong? I would think
> the simpler implementation would simply to have "load theme" automatically
> disable the present theme, which is both conceptually and pragmatically
> easier. But the manual doesn't seem to mention much about themes, so I
> haven't found an explanation (or possible use) for this stacking
> implementation.
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Why do themes stack?
2015-01-31 13:56 ` Artur Malabarba
@ 2015-01-31 14:32 ` Tory S. Anderson
0 siblings, 0 replies; 5+ messages in thread
From: Tory S. Anderson @ 2015-01-31 14:32 UTC (permalink / raw)
To: bruce.connor.am; +Cc: help-gnu-emacs
Ah--themes can be mode specific! I had no idea. Thanks for the revelation.
Artur Malabarba <bruce.connor.am@gmail.com> writes:
> Because then you can have different themes which apply to different
> faces.
>
> For instance, if you really like Magit you could release a theme that
> only customizes Magit faces.
>
> If themes didn't stack, nobody would ever use your theme because it
> doesn't do anything outside Magit buffers. Since themes DO stack,
> users can use your theme in addition to their global theme. This way,
> people get all the Magit-dedicated love of your theme while still
> having another nice theme everywhere else.
>
> The fact that extremely few special themes like this exist is a shame.
> It increases confusion on the users, and increases pressure on the
> theme developers to support every single major-mode under the sun.
>
> On 31 Jan 2015 12:54, "Tory S. Anderson" <torys.anderson@gmail.com>
> wrote:
>
> Throughout my work day I'll switch themes now and again to go from
> high contrast to lower, or from dark to light. This process
> requires disabling the present theme and then loading the next
> theme; if you forget to disable, the themes stack, usually with
> undesirable consequences.
>
> Why is it implemented this way? Does anyone out there actually
> gain utility from theme stacking? Or am I doing something wrong? I
> would think the simpler implementation would simply to have "load
> theme" automatically disable the present theme, which is both
> conceptually and pragmatically easier. But the manual doesn't seem
> to mention much about themes, so I haven't found an explanation
> (or possible use) for this stacking implementation.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-31 14:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-31 12:54 Why do themes stack? Tory S. Anderson
2015-01-31 13:16 ` Rasmus
2015-01-31 13:37 ` Tory S. Anderson
2015-01-31 13:56 ` Artur Malabarba
2015-01-31 14:32 ` Tory S. Anderson
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).