emacs-solaire-mode icon indicating copy to clipboard operation
emacs-solaire-mode copied to clipboard

Solaire mode not properly enabled in emacsclient

Open zamlz opened this issue 4 years ago • 5 comments

Hey So i'm not seeing solaire-mode properly enabled when I use it alongside an emacsclient setup. It does however work, when I change themes from the client. Because of this I figured that perhaps all I needed was to add :after solaire-mode in the doom-themes configuration.

zamlz avatar Jul 02 '21 20:07 zamlz

As a temporary fix, you can add the following to you config file, replaceing doom-palenight with your chosen theme.

(add-hook 'server-after-make-frame-hook '(lambda () (load-theme 'doom-palenight t)))

This will fix your client, but it will cause the non-client emacs to be themeless.

jeslie0 avatar Oct 29 '21 15:10 jeslie0

Can you expand on how you are activating solaire-mode? Or at the very least provide steps to reproduce the problem? This seems like a configuration issue.

hlissner avatar Nov 13 '21 19:11 hlissner

My related setup is the following:

(use-package solaire-mode
  :defer t
  :custom
  (solaire-global-mode +1)
  )

(use-package doom-themes
  :defer t
  :hook (server-after-make-frame . (lambda () (load-theme
					       'doom-palenight t)))
  )

Using this, I get Solaire mode to work in emacsclient. If I just do the usual "load-theme", it doesn't get loaded properly.

jeslie0 avatar Nov 14 '21 02:11 jeslie0

I have the same problem with emacsclient. Although, I don't get the provided work around working with the modus themes.

When I run emacs (not emacsclient) with same config it works as expected.

However, I can get the desired behavior by executing the (use-package modus-themes [...]) by hand in a running session. As such, I also experimented with the :after keyword, with no success.

FWIW, my config:

(use-package modus-themes
  :bind(
        ("C-x M-t t" . modus-themes-toggle))
  :init
  ;; Add all your customizations prior to loading the themes
  (setq modus-themes-italic-constructs t
        modus-themes-bold-constructs t
        modus-themes-region '(bg-only no-extend)
        modus-themes-org-blocks 'tinted-background)

  ;; Load the theme files before enabling a theme
  (modus-themes-load-themes)

  :config
  ;; Load the theme of your choice:
  (modus-themes-load-vivendi))

(use-package solaire-mode
  :config
  (solaire-global-mode +1))

grszkthfr avatar May 13 '22 22:05 grszkthfr

Same problem of solaire-mode not loading in emacsclient using emacs 28.1 with doom-gruvbox theme. So I followed suggestion and added:

(add-hook 'server-after-make-frame-hook '(lambda () (load-theme 'doom-gruvbox t)))

This worked to enable solaire-mode, but it messed up a bunch of font faces, turning all the grey comments in elisp files and in the scratch buffer into bright red, and the org-mode #+begin_quote mark up red. I did not want to start going through and figuring out what faces had been changed and changing them all by hand, so I just uninstalled.

But again, it worked fine when not running emacs in client mode.

jhncondix avatar Sep 18 '23 00:09 jhncondix