1

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?

  • Are you using custom themes (i.e., gnu.org/software/emacs/manual/html_node/emacs/… ), or the color-theme library (i.e., color-theme-6.6.0.zip from: download.savannah.gnu.org/releases/color-theme )? – lawlist Nov 15 '14 at 20:02
  • 1
    @lawlist I am sorry but as I am new to Emacs I don't really know what you mean. I installed Emacs and having placed in the list of packages the Melpa archive I installed the themes via the list-packages as the first time. – Adam Nov 15 '14 at 20:05
  • 2
    I tried a lot of themes (with the same result) but the one I used previously and I still want to use it the dakrone-theme. – Adam Nov 15 '14 at 20:07
  • 1
    The message that appears immediately after installing the 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 – lawlist Nov 15 '14 at 20:12
  • 2
    Well, when all else fails, follow the instructions -- open up your .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. – lawlist Nov 15 '14 at 20:20
4

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.

  • 2
    Thank 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! – Adam Nov 16 '14 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. – lawlist Nov 16 '14 at 1:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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