(add-to-list 'custom-theme-load-path "~/.emacs.d")
(load-theme 'sanityinc-solarized-dark-theme)

I have these two lines in my .emacs file, and those theme files in the listed directory, yet emacs still does not detect the theme file.

I've seen other threads with similar issues, but none have worked for me so far, particularly with using package.el

Any help?

1 Answer 1


If you are installing the theme using the package.el, you should not set the custom-theme-load-path.

All you need to do is:

  • Install the theme from the emacs package manager as explained in the theme's instructions.
  • Put (load-theme 'sanityinc-solarized-dark) in your .emacs.
  • The first time you load the theme (and the first time after each update of that theme), emacs will ask if you consider that theme to be safe and you hit y or yes.

How to install this theme step-by-step from an emacs -Q session

  1. Eval below in the *scratch* buffer

    (require 'package)

    (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))

  2. M-x package-list-archives.

  3. Find the theme package you want to install, color-theme-sanityinc-solarized in this case.
  4. Important Step! M-x package-initialize or eval (package-initialize).
  5. M-x customize-themes and select the check box in front of sanityinc-solarized-dark or sanityinc-solarized-light.
  6. Done.

How to load this theme automatically when you restart emacs

Here is a minimum-working test-load-theme.el file to load this theme automatically. You need to have the theme installed using the package manager first!

(require 'package)
(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/"))
(load-theme 'sanityinc-solarized-dark t)

Save above in ~/.emacs.d/test-load-theme.el. It is a good convention to put emacs related stuff in ~/.emacs.d.

Start a fresh emacs session while loading just the above file:

\emacs -Q -l ~/.emacs.d/test-load-theme.el

Related emacs.SE question

  • It says that the theme is not found. I installed the color-theme-sanityinc-solarized-2.25. That's the folder name. Should I just write the name without the 2.25? Feb 12, 2015 at 0:51
  • I have updated my answer on how to install this theme in a fresh emacs -Q session. Suggestions: (1) Erase the customization for custom-theme-load-path (2) You are probably missing (package-initialize) in your .emacs file. Feb 12, 2015 at 14:11
  • Also the theme name is sanityinc-solarized-dark, not sanityinc-solarized-dark-theme. Feb 12, 2015 at 14:30
  • Awesome! So what was the problem? Feb 12, 2015 at 23:32
  • I wasn't too sure. I think I had a different theme name Feb 12, 2015 at 23:32

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.