All of a sudden Emacs returns an error at the startup, when I run $ emacs --debug-init
from the terminal (linux) I get this debug error message:
Debugger entered--Lisp error: (wrong-type-argument listp <!DOCTYPE)
package--read-archive-file("archives/gnu/archive-contents")
package-read-archive-contents("gnu")
package-read-all-archive-contents()
package-initialize()
eval-buffer(#<buffer *load*> nil "/home/ffs/.emacs.d/init.el" nil t) ; Reading at buffer position 136
load-with-code-conversion("/home/ffs/.emacs.d/init.el" "/home/ffs/.emacs.d/init.el" t t)
load("/home/ffs/.emacs.d/init" t t)
#[0 "\205\266 \306=\203\307\310Q\202? \311=\204\307\312Q\202?\313\307\314\315#\203*\316\202?\313\307\314\317#\203>\320\321\322!D\nB\323\202?\316\324\325\324\211#\210\324=\203e\326\327\330\307\331Q!\"\325\324\211#\210\324=\203d\210\203\247\332!\333\232\203\247\334!\211\335P\336!\203\201\211\202\214\336!\203\213\202\214\314\262\203\245\337\"\203\243\340\341#\210\342\343!\210\266\f?\205\264\314\325\344\324\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" initialization format-message "`_emacs' init file is deprecated, please use `.emacs'" "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7]()
command-line()
normal-top-level()
What I suspect is the first lines of my init.el
which has the following start:
(require 'package)
(package-initialize)
(require some_pakagename)
...
when I evaluate the line of (package-initialize)
C-x C-e from inside the init.el
file I get this error:
package-read-archive-contents: Wrong type argument: listp, <!DOCTYPE
I get the same error when I try doing M-x list-packages
from the mini-buffer.
So, please could you help me spot the source of error?
~/.emacs.d/elpa/archives/gnu/achive-contents
file, if you are curious to find out what the error was. I'm not 100% sure it's OK to just delete this file, but given your circumstances, this sounds like the way to go (the file isn't useful anyway).