* bug#29443: Document how to set themes depending on a condition
@ 2017-11-25 17:40 積丹尼 Dan Jacobson
2017-11-26 13:44 ` Charles A. Roelli
0 siblings, 1 reply; 3+ messages in thread
From: 積丹尼 Dan Jacobson @ 2017-11-25 17:40 UTC (permalink / raw)
To: 29443
In (info "(emacs) Custom Themes") after
Setting or saving Custom themes actually works by customizing the
variable ‘custom-enabled-themes’. The value of this variable is a list
of Custom theme names (as Lisp symbols, e.g., ‘tango’). Instead of
using the ‘*Custom Themes*’ buffer to set ‘custom-enabled-themes’, you
can customize the variable using the usual customization interface,
e.g., with ‘M-x customize-option’.
please add:
Here's how to set a theme depending on a condition:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
(if(/= 0(user-uid)) '(custom-enabled-themes (quote (wheatgrass)))))
In the above we have added a condition to what Custom has put into the
customization file we found on our disk.
We set the wheatgrass theme if we are not root.
One could go further and set different themes for different seasons. The
sky's the limit!
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#29443: Document how to set themes depending on a condition
2017-11-25 17:40 bug#29443: Document how to set themes depending on a condition 積丹尼 Dan Jacobson
@ 2017-11-26 13:44 ` Charles A. Roelli
2019-10-12 20:59 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Charles A. Roelli @ 2017-11-26 13:44 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 29443
It's an interesting idea, but if you later try to customize your
enabled theme further, you will lose the handwritten condition. Maybe
Customize could be improved to support this use case.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#29443: Document how to set themes depending on a condition
2017-11-26 13:44 ` Charles A. Roelli
@ 2019-10-12 20:59 ` Lars Ingebrigtsen
0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-12 20:59 UTC (permalink / raw)
To: Charles A. Roelli; +Cc: 29443, 積丹尼 Dan Jacobson
charles@aurox.ch (Charles A. Roelli) writes:
> It's an interesting idea, but if you later try to customize your
> enabled theme further, you will lose the handwritten condition.
Yes, so I don't think we want to document anything along the lines
suggested.
> Maybe Customize could be improved to support this use case.
I think that's beyond the scope of Customize, so I'm closing this bug
report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-12 20:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-25 17:40 bug#29443: Document how to set themes depending on a condition 積丹尼 Dan Jacobson
2017-11-26 13:44 ` Charles A. Roelli
2019-10-12 20:59 ` Lars Ingebrigtsen
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).