I have a hint for leuven which look quite nice, especially the presentation in orgmode, so I've installed with from the package manager.

Since I can't find it in M-x cusomize-themes, I have tried to load it with (load-theme 'leuven) in my .emacs, and this cause emacs -daemon failing to start...

Has anyone ever encountered that problem with leuven theme before ?

Thank you

  • emacsclient is not starting because you probably have a yes or no prompt blocking it. Try using (load-theme 'leuven :no-confirm) instead. Also note that do not set the customize-theme-load-path variable using the Customize interface -- Source. Commented Jan 11, 2016 at 16:20

3 Answers 3


I have similar issue before. My understanding is emacs --daemon doesn't try to create a frame. But the theme or face configuration try to wait until the frame is created to apply it.

My current solution is (not perfect):

Add you configuration to after-make-frame-functions hook.

For example:

(defun ec-theme-cfg ()
    ;; put your configuration here)

(add-hook 'after-make-frame-functions #'ec-theme-cfg)

After that change, emacs --daemon can start properly and emacsclient works well.

But there's an issue with this solution, after run emacs --daemon, I have to at least create an Emacs frame (emacsclient -c) before I can use emacsclient -t from terminal.


The best way would be to make sure it does appear in your customize-themesmenu, rather than loading it manually via your init file. Leuven appear sin my list of themes (although you can see below I do not use it as default)

Is you can see in the image below, there is the tip at the top

Theme files are named *-theme.el in `custom-theme-load-path'.

enter image description here

So make sure you have the file saved on that path. To get help with this, try C-h v then custom-theme-load-path, which will show you the current path(s) defined and gives hints on how to customise it.

  • The path is present in custom-theme-load-path and leuven-theme.el is there... Commented Dec 12, 2015 at 19:03
  • It was already, or have you just added the path and file? Restart emacs so the paths are reloaded. Otherwise, without knowing more, I cannot guess as to why customize-themes isn't listing it! Maybe Look inside the file itself for a clue. Alternatively, just place the file in your .emacs.d/ in a folder of your choice, then add that to custom-theme-load-path. Try that anyway, if nothing else works.
    – n1k31t4
    Commented Dec 12, 2015 at 19:34
  • Ok I've decided to clean everything and reinstall emacs and now I can see it. While trying to solve my problem, I have learnt more about theme, custom vs color and now I am scared about custom theme ! I just have apply leuven without saving, and after restarting it's still here ! So to keep emacs clean I guess I don't wan't to try themes and choose THE theme, am I right ? How do you manage your themes ? Commented Dec 12, 2015 at 20:30
  • After you applied leuven, if it stays there after a restart then I imagine a line was added to your .emacs file, somewhere towards the bottom in custom-set-variables. I haven't played with themes for a while, I just switch between the two that I use manaually, but I do have something like this installed so I have a shortcut to swap between themes too. color-theme is also a nice package for managing themes, but I didn't find a way to include themes that aren't already contained within that package. I use the zero-dark and leuven themes.
    – n1k31t4
    Commented Dec 12, 2015 at 22:43
  • @DexterMorgan FYI for color-theme You can just do: (add-to-list 'load-path ".emacs.d/plugins/color-theme/themes/") before (color-theme-initialize) to point the package to a subdirectory full of additional themes.
    – InHarmsWay
    Commented Jun 6, 2016 at 11:05

I've had problems with emacs-daemon and themes for a while. I bind this to f5 and just execute it after I open my first frame. Without doing this spacemacs-dark doesn't appear quite right.

(defun startup-load ()
  "Reload things because Emacs daemon has strange behavior with frames and themes."
  (load-theme 'spacemacs-dark t)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.