[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enable/disable theme while using desktop-save-mode
From: |
YUE Daian |
Subject: |
Re: Enable/disable theme while using desktop-save-mode |
Date: |
Wed, 06 Nov 2019 16:03:40 +0800 |
On 2019-11-06 10:38, Pankaj Jangid <pankaj.jangid@gmail.com> wrote:
>> I'd recommend you give more details. Such as *how* you "disable" your
>> themes and what settings you have noticed are still affected by the
>> (now disabled) themes.
>
> Okay. Here is my configuration,
>
> #+BEGIN_SRC emacs-lisp
> (setq-default custom-enabled-themes '(sanityinc-tomorrow-bright))
>
> ;; Ensure that themes will be applied even if they have not been customized
> (defun reapply-themes ()
> "Forcibly load the themes listed in `custom-enabled-themes'."
> (dolist (theme custom-enabled-themes)
> (unless (custom-theme-p theme)
> (load-theme theme))))
>
> (add-hook 'after-init-hook 'reapply-themes)
> #+END_SRC
>
> Now, to disable the theme I just commented these lines and restarted
> Emacs. This should start Emacs with default theme with white
> background. But the application starts with dark background although
> some of the settings are gone. The font colours etc are different.
>
> I am suspecting that this is because I have desktop-save-mode
> enabled. If I start with '-Q' option then everything is ok. Because then
> it doesn't read the desktop file.
>
> I want to understand how to completely wipe out theme settings even from
> saved-desktop. (If that is the reason).
>
> Regards,
> --
> Pankaj Jangid
I came across this problem before.
I do not know ~sanityinc-tomorrow-bright~, but some themes will modify
some settings once loaded.
Could you please try to load ~whiteboard~ theme (the default one) after
package initialization?
Loading it should really "initializing" the theme.