syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.68k stars 4.89k forks source link

Emacs server and themes-megapack #14131

Closed cantao closed 3 years ago

cantao commented 3 years ago

Hi!

I'm using a systemd service to start the Emacs server (boils down to emacs --fg-daemon). The script is part of the Emacs 27.1 package on my Arch Linux machine.

Without the themes-megapack layer, everything works just fine, including the standard themes. Installing it however, reverts the font to the default and I cannot change themes anymore.

Uninstalling the themes-megapack or running emacs directly (no server involved) solves the issue.

Any hints?

Thank you very much!

practicalli-johnny commented 3 years ago

@cantao Themes megapack layer is not required if you wish to use themes from this extensive list already included in Spacemacs core (at least for Spacemacs version 0.300, aka develop) https://github.com/syl20bnr/spacemacs/blob/develop/core/core-themes-support.el#L30-L289

Simply add the theme name to the existing dotspacemacs-themes setting in your .spacemacs configuration file and the theme will be downloaded when the .spacemacs configuration is reloaded, SPC f e R.

Here is the theme configuration I currently use, the first theme in the list is the default theme.

   dotspacemacs-themes '(doom-gruvbox-light
                         doom-solarized-light
                         doom-sourcerer
                         kaolin-valley-dark
                         doom-solarized-dark
                         spacemacs-light
                         spacemacs-dark)

SPC T s will start helm-themes and show a list of themes available. Using C-c C-f with the helm-themes menu open will apply each theme as you scroll through the list of available themes.

If you are not using develop, try switching https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html

cantao commented 3 years ago

Hi @jr0cket ! Thanks for taking the time to explain it all, always learning something new. After a lot of Lisp dark magic and Google-fu (not knowing Lisp, by the way), I've found the "culprit" to be Xresources.

It seems that when running the server, some customizations that only work after a frame is created, are lost and Xresources take precendence. I have tried to tame default-frame-alist, but no luck here.

I really had no idea that dotspacemacs-themes could trigger a download/install like a layer! I'm going to give it a try.

Thank you very much!