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
Eval below in the *scratch* buffer
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
M-x package-list-archives
.
- Find the theme package you want to install,
color-theme-sanityinc-solarized
in this case.
- Important Step!
M-x package-initialize
or eval (package-initialize)
.
M-x customize-themes
and select the check box in front of sanityinc-solarized-dark
or sanityinc-solarized-light
.
- 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/"))
(package-initialize)
(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
That's the folder name. Should I just write the name without the 2.25?
– CodeSammich Feb 12 '15 at 00:51emacs -Q
session. Suggestions: (1) Erase the customization forcustom-theme-load-path
(2) You are probably missing(package-initialize)
in your .emacs file. – Kaushal Modi Feb 12 '15 at 14:11sanityinc-solarized-dark
, notsanityinc-solarized-dark-theme
. – Kaushal Modi Feb 12 '15 at 14:30t
is not mandatory. Having it there prevents emacs from asking you if you consider the theme as safe and want to load it. – Kaushal Modi Feb 12 '15 at 23:37