Open davidbudzynski opened 2 years ago
Same issue here, but my spacing is also broken. Notably, on the first load colors are correct. Afterwards, every following frame must run doom/reload-theme
to correct the issue.
Tested with the doom-gruvbox
and doom-one
themes.
First frame:
Every following frame:
I found a solution but am not sure how to integrate it into doom.
From a reddit post six years ago, so it appears to be a long-standing issue effecting theme load in the daemon: https://www.reddit.com/r/emacs/comments/3a5kim/emacsclient_does_not_respect_themefont_setting/cs9i9qd/
Adding this to my init.el solved the problem:
(defun load-doom-gruvbox-theme (frame)
(select-frame frame)
(load-theme 'doom-gruvbox t))
(if (daemonp)
(add-hook 'after-make-frame-functions #'load-doom-gruvbox-theme)
(load-theme 'doom-gruvbox t))
Thanks for sharing! Not sure if this is theming issue or Emacs issue then! This might be difficult for me to pull off because I can't decide on having one theme for more than a few weeks.
I also experienced this issue in Emacs 28.1 (with pgtk+native comp). @davidbudzynski I made a minor edit from @king-gheedorah code so that it will follow your currently set theme. Note that it uses doom-theme
variable.
Edit: I put the following code in my config.el
- (defun load-doom-gruvbox-theme (frame)
+ (defun load-doom-theme (frame)
(select-frame frame)
- (load-theme 'doom-gruvbox t))
+ (load-theme doom-theme t))
(if (daemonp)
- (add-hook 'after-make-frame-functions #'load-doom-gruvbox-theme)
- (load-theme 'doom-gruvbox t))
+ (add-hook 'after-make-frame-functions #'load-doom-theme)
+ (load-theme doom-theme t))
As based on the Reddit post mentioned above, it is likely an upstream issue related with emacs
daemon-client behavior on theming. I have not figure out whether the bug already filled out or not.
thanks, @mangkoran!
I am also seeing this problem with Emacs 29. The biggest issue is with light themes, because the cursor is usually not visible (white background and foreground).
What did you expect to happen?
Both GUI and emacsclient should have the same color applied for the cursor column highlight, or cursor color in general. When using the doom solarized light and solarized dark high contrast (only tested these two), the cursor highlight color is inconsistent across both.
What actually happened?
Emacsclient version is light and has the incorrect color:
Standard GUI version looks normal and has the correct color for the color scheme:
Describe your attempts to resolve the issue
Running
doom/reload-theme
appears to fix the problem.Steps to reproduce
System Information
https://pastebin.com/198wTrk6