[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Themes" shipping configuration - an unusual convention

From: Stefan Kangas
Subject: "Themes" shipping configuration - an unusual convention
Date: Thu, 30 Apr 2020 09:49:19 +0200

Stefan Monnier <address@hidden> writes:

> > The pre-configuration could contain just one line:
> >
> >   (require 'shiny-settings)
> Nitpick: `require` is *really* not the right job since just loading
> a file should not change Emacs's behavior substantially.
> Ideally, it should be a custom-theme, but second best could be
> a minor-mode.

So a theme can be used to change configuration, and indeed this is the
recommended way to do it.  Interesting, and news to me.  But is this a
good convention?  I'm not so sure.

AFAIK, all other applications I have used understand "theme" to mean a
"package containing graphical appearance details".  This definition
from Wikipedia: https://en.wikipedia.org/wiki/Theme_(computing)

I don't think users will expect a "theme" to modify the behavior of
Emacs.  There are usually things called "profiles" where one would
save or load settings from.  This means that if M-x load-theme changes
the behavior of Emacs (significantly or otherwise), they are in for a

I would propose to change the convention such that a "theme" is only
meant to modify "graphical appearance details".   Not behavior.  (From
what I can tell, all themes currently shipped with Emacs follow this

We could introduce a *separate* convention, called e.g. "custom
profiles", which are understood to also change settings.  They could
have their own directory in our tree called "etc/profiles", and
separate commands to load them (say, M-x load-profile).

Of course, a "custom profile" could technically do anything a "theme"
does and vice versa.  Just as a 'require'd package can technically
override any face, enable viper-mode or whatever.  But we should
discourage that.

Best regards,
Stefan Kangas

PS. If anyone can point to an example of a "custom theme" that ships
settings, it would be interesting to see it.

1. The exception is some variables related to graphical display, which
is not unusual or surprising to my mind.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]