I re-installed Emacs and I tried to change the color theme. I saved the changes and the .emacs
file was updated but when I restarted Emacs the theme was not active! I want to point out that the package is installed in the elpa folder. The theme was loaded when I pressed it and took effect but it was not working after the restart. When I did the same for the custom themes they were working fine. I had used the same theme previously with no problem. Also the problem is not because of the theme as I tried to install more with no success. What is the problem?
1 Answer
STEP 1: Place the following code in the .emacs
file, and restart Emacs.
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
STEP 2: M-x list-packages RET
STEP 3: Click on and install dakrone-theme
.
STEP 4: Open up the .emacs
file and add the following line of code at the very bottom and then restart Emacs:
(load-theme 'dakrone t)
STEP 5: Crack open your favorite beverage and enjoy your new color theme.
-
2Thank you your answer helped because of the
(package-initialize)
. I had forgotten to add it! I placed it in my.emacs
and everything works great! Thank you for reminding me!– AdamCommented Nov 16, 2014 at 1:04 -
Glad to help -- the
package-initialize
function helps Emacs locate the appropriate contents of the.emacs.d
directory and do whatever needs to be done with the installed packages.– lawlistCommented Nov 16, 2014 at 1:16
color-theme
library (i.e.,color-theme-6.6.0.zip
from: download.savannah.gnu.org/releases/color-theme )?list-packages
as the first time.dakrone-theme
is: "A dark theme with lots of color. To use, put the following in your Emacs config:(load-theme 'dakrone t)
. Requires Emacs 24." So, the first question is: Did you do that -- i.e., manually add(load-theme 'dakrone t)
to your.emacs
file? The second question is: Are you using a version of Emacs that is at least 24? To answer the second question, you can type:M-x emacs-version RET
.emacs
file and add(load-theme 'dakrone t)
-- preferably at the bottom. Then restart Emacs. If that works, then your error is probably higher up in your.emacs
file -- i.e., Emacs loads settings from the top of the file to the bottom of the file, and the bottom is the last to load. Also, check your*Messages*
buffer to see if there is anything mentioned there about an error of some sort or another.