circadian.el
circadian.el copied to clipboard
Theme not fully loaded on switch
Thanks for this great package! And for the theme suggestions, I love them!
I'm using a very similar setup as the one from the README:
(setq calendar-latitude 26.084534)
(setq calendar-longitude -80.238454)
(setq circadian-themes '((:sunrise . apropospriate-light)
(:sunset . nord)))
(circadian-setup)
The switch as sunrise/sunset does occur, but leaves me with a theme not fully loaded. Here is a screenshot of a session using Polymode on a RMarkdown file (so essentially mixing Markdown and ESS mode), after a sunset switch to Nord theme:
Simply closing and restarting Emacs shows what I should have:
What's missing is the correct background in the ESS chunk. Not too sure where to starts from here…
Hey basille,
glad you like the package 👍 And thanks a lot for reporting that bug - I had issues like this before, too. I thought the last update would have fixed it.
Which Emacs version and which package-version of circadian are you using, so I can try to work out what's going on.
Sorry I should have started with this:
- GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian
- circadian 0.3.0 from MELPA-stable
- ESS 17.11 from MELPA-stable (if that matters)
I also have problems in the morning when switching back to `apropospriate-light, now in the mode line. Here is what I have after automatic switching:
Here is how it should be:
Notice the vertical black bars which are not part of the theme.
Thanks for the information - I will try to check on the issue as soon as possible 🙂
@basille How do you install the themes, that you want to be loaded by circadian? I could reproduce the behaviour, you are experiencing only when installing themes with use-package
. If you install them via use-package
, too, try to add the :defer
keyword - that solved the issue for me.
;; Try to add `:defer` keyword, if you're using use-package
(use-package apropospriate-theme :ensure :defer)
(use-package nord-theme :ensure :defer)
(use-package circadian
:ensure
:init
:config
(setq calendar-latitude 26.084534)
(setq calendar-longitude -80.238454)
(setq circadian-themes '((:sunrise . apropospriate-light)
(:sunset . nord)))
(circadian-setup))
Let me know, if that solved your issue, too - otherwise I'll need to have a deeper look on what is going on in detail 🕵️
Thanks @guidoschmidt to look into it. As a matter of fact, I do not use use-package
, but a custom init.org
file that installs additional packages with package-install <whatever_package>
. I'm not too familiar with use-package
though — what does :defer
do? Should I load the themes with something special? My setup regarding themes is really this only snippet from my initial post.
@basille Do you still have this issue? I just recently found out, that Emacs is loading a theme by default, when you do (require 'nord-theme)
e.g (Didn't run into that issue, as I was using use-package
from the very beginning - :defer
just auto-loads the package lazily when it's need). Maybe you have some lines that require a theme in your init.org
after (circadian-setup)
has been called? 🤔
Additionally, did you check your timezone configuration, maybe circadian has issues fetching the correct sunrise/sunset time?
@guidoschmidt , thanks for your follow-up! As a matter of fact, I still have the same problem, and I regularly close and reopen Emacs when theme switches… You can find my complete .emacs here, but essentially, theme configuration is pretty much the first thing that happens… and coordinates are configured through calendar-latitude
and calendar-longitude
as shown in my initial post.
@basille I just recently found some time to check your config - sorry for the long time period 😦
I cloned your .emacs.d
and tried the recent version of circadian (0.3.2 - published yesterday) which worked fine so far. It turned out, that the nord-theme
seems to be setting a bunch of custom-face-attributes
, that are not part of default themeing. You could try to reset the custom-face-attributes
using a hook:
(setq circadian-themes '((:sunrise . apropospriate-light)
(:sunset . nord)))
;; This resets the custom-face-attributes list and will hopefully clear all customizations
;; that the nord-theme has set.
(add-hook 'circadian-before-load-theme-hook
#'(lambda (theme)
(setq custom-face-attributes '())))
(circadian-setup)
Could you try if that resolves your issue? 🤔
Another solution would be to rely on another theme instead of nord
@guidoschmidt, I have modified my setup in the meanwhile: the mode-line was actually using powerline, which I removed entirely due to various issues (mostly readability, but also this issue), and I need to do more testing about it. Unfortunately, themes only switch twice a day, and I don't necessarily have Emacs open at this moment! I'll definitely report back (and try the trick you just posted if need be). Thanks!
Hi @guidoschmidt, I tried the additional setup you suggested, but I still have the original issue (at the beginning of this thread), i.e. R chunks in Polymode not switching to the new mode together with the rest of the interface.
@basille did this issue resolve somehow? Looks like in your .emacs.d
repository, you are using circadian? Is it working as expected, because still I can't really reproduce how that behaviour 🙈
Thanks @guidoschmidt for checking in, and sorry for the late answer! Unfortunately, I still have the same issues when switching to Nord theme — it may just have to do with this theme, to be honest I did not try other themes, and kind of got used to closing and restarting Emacs altogether… 🤦♂️
Would you like me to check with another night theme? (any suggestion for a good one?)
All fine - I haven't worked on circadian for quite a while myself. I'm using doom-themes
a lot, you could try with doom-nord
e.g. hopefully it's really a specific issue with the theme and this helps
Thanks for the suggestion. Nice themes!
So I quickly played around using both doom-one
and doom-one-light
and unfortunately, same thing always happens: Whenever there's a switch, embedded R code blocks keep the previous one until they're edited.
It seems to me that there's a conflict between the way circadian
switches themes, and how polymode
deals with embedded chunks. Do you think it might be worth asking there too?
I just played around with another extension (Auto-Dark for Emacs), which shows the exact same problem on switching. Seems to reinforce the idea that the bug might actually be on the polymode
side. Let me try there.
@basille sorry this is not working for you for such a long time now. You could try a fresh Emacs config with almost nothing but your desired themes and circadian.el installed, to see if the issue still remains?