Can't get Emacs24 to load themes

For starters, my version is Emacs GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2) of 2014-06-06 on barber, modified by Debian

, and I'm running Debian Jessie as the only OS on a 2009 Macbook Pro.

So, I downloaded a lot of themes from the net that I think would make Emacs more reassuring and put them in my folder ~/.emacs.d/themes/

. I have downloaded the packages emacs-goodies-el

. I have set a custom download path for these themes in this particular folder. When I start, I either get one of two things depending on whether I'm actually trying to load themes using (load-theme tron t)

or not. Both errors are of type Symbol value as variable is void: <!DOCTYPE

.

When I run Emacs in --debut-init

, this is what I get:

Debugger entered--Lisp error: (void-variable <!DOCTYPE)
eval-buffer()  ; Reading at buffer position 14
load-theme(jazz t)
eval-buffer(#<buffer  *load*> nil "/home/finnds/.emacs" nil t)  ; 
Reading at buffer      position 1203
load-with-code-conversion("/home/finnds/.emacs" "/home/finnds/.emacs" t t)
load("~/.emacs" t t)
#[0 "\205\262

      

When I try to load themes via M-x customize-themes

, I get the error: load-theme: Symbol value as variable is void: <!DOCTYPE

and all colors go back to white / light / default.

And here's my .emacs

file, after custom-set-variables

and custom-set-faces

(which means it's all at the bottom of the file):

(add-to-list 'custom-theme-load-path "~/.emacs.d/")
(load-theme 'jazz t)
(require 'color-theme)
(eval-after-load "color-theme"
  '(progn
     (color-theme-initialize)))
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                         ("marmalade" . "http://marmalade-repo.org/packages/")
                         ("melpa" . "http://melpa.milkbox.net/packages/")))

      

I've tried what the wiki tells me, and a few other topics, but I keep getting this message anyway. I tried looking for an answer, but I didn't find a specific person like my exact case. Can anyone help me here? Thanks in advance!

+3


source to share


2 answers


  • You are trying to load an HTML file, not an Emacs-Lisp file. It looks like you saved the file incorrectly. <!DOCTYPE

    that's what it tells you.

  • the article written by Bozidar B. and quoted by him is misleading. I recommend the EmacsWiki page instead . It fairly compares and contrasts the color themes that the library provides with the custom themes that were added in vanilla Emacs 24. color-theme.el

  • These two types of theme are not the same thing, and they do not replace the other, despite what you might hear. Each has its own advantages (and disadvantages) and use cases.

    And yes, you can use both - it is not that "you should not do this." Read the wiki page, find out both of them, and then think about what works for you.

    I say this without a horse in the race. My code ( Icicles and Make Re Mi ) that allows you to loop through themes etc. Supports the same themes: color themes and custom themes.



+1


source


You are mixing old (package-based color-theme

) color theme handling and Emacs 24.x built-in support for themes that you shouldn't. I would suggest taking a look at this article to learn more about color themes in Emacs. Here's an example of a minimal setup (using zenburn theme):

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/"))
(package-initialize)

(unless (package-installed-p 'zenburn-theme) (package-install 'zenburn-theme))

(load-theme 'zenburn t)

      

To download a locally available theme:



(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'theme-name t)

      

It is assumed that you have placed an Emacs 24 compatible theme theme-name

in the folder ~/.emacs.d/themes

.

+3


source







All Articles