Linux – Installing Emacs color theme

colorsemacslinuxthemes

I've been trying to install color themes for emacs and I'm not quite sure how I can do it. I have downloaded an .el file and put it under my .emacs.d folder, then edited my .emacs file and added this:

(add-to-list 'load-path "~/.emacs.d/empty-void.el")
(add-to-list 'load-path "~/.emacs.d/color-theme.el")
(require 'color-theme)
(load-theme 'empty-void)
(eval-after-load "color-theme"
  '(progn
    (color-theme-initialize)))

Then I opened emacs and tried to do M-x color-theme-empty-void but there isn't any command like that. So I did M-x color-theme-select but the theme was not listed there either.

I tried this with other theme files too but I couldn't get it to work. How can I load the theme files to color-theme?

Best Answer

Step 1:  Download the latest version of color-theme -- i.e., color-theme-6.6.0.zip from: http://download.savannah.gnu.org/releases/color-theme/

Step 2:  Extract archive to the ~/.emacs.d directory. This process will create the following two directories: ~/.emacs.d/color-theme-6.6.0 and ~/.emacs.d/color-theme-6.6.0/themes

Step 3:  Download (to the preferred location, e.g., ~/.emacs.d/color-theme-6.6.0/themes) the original source of the file that is presumably being used by the original poster of this particular thread -- i.e., color-theme-empty-void.el from ( http://www.emacswiki.org/emacs/download/color-theme-empty-void.el ). I choose to keep the same name of the file and I saved it to: ~/.emacs.d/color-theme-6.6.0/themes/color-theme-empty-void.el

Step 4:  Add the following lines of code to the .emacs file:

(add-to-list 'load-path "~/.emacs.d/color-theme-6.6.0")

(require 'color-theme)

(color-theme-initialize)

(color-theme-empty-void)

Step 5:  Restart Emacs and enjoy.

Related Question