GNU bug report logs - #29443
Document how to set themes depending on a condition

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 25 Nov 2017 18:36:02 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29443 in the body.
You can then email your comments to 29443 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29443; Package emacs. (Sat, 25 Nov 2017 18:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 25 Nov 2017 18:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Document how to set themes depending on a condition
Date: Sun, 26 Nov 2017 01:40:16 +0800
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!





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29443; Package emacs. (Sun, 26 Nov 2017 13:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 29443 <at> debbugs.gnu.org (full text, mbox):

From: charles <at> aurox.ch (Charles A. Roelli)
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 29443 <at> debbugs.gnu.org
Subject: Re: bug#29443: Document how to set themes depending on a condition
Date: Sun, 26 Nov 2017 14:44:26 +0100
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29443; Package emacs. (Sat, 12 Oct 2019 21:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 29443 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: charles <at> aurox.ch (Charles A. Roelli)
Cc: 29443 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#29443: Document how to set themes depending on a condition
Date: Sat, 12 Oct 2019 22:59:13 +0200
charles <at> 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




bug closed, send any further explanations to 29443 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 12 Oct 2019 21:00:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 10 Nov 2019 12:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.