我在windows 10平台下使用Emacs 25.3。
它可以正常工作,直到有一次我启动它并得到以下消息:
Warning (initialization): An error occurred while loading ‘
c:/Users/shore/AppData/Roaming/.emacs’:
Wrong type argument: listp, <html>
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.按照指示,我使用--调试-init选项启动并获得以下消息:
Debugger entered--Lisp error: (wrong-type-argument listp <html>)
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 "c:/Users/shore/AppData/Roaming/.emacs" nil t) ; Reading at buffer position 275
load-with-code-conversion("c:/Users/shore/AppData/Roaming/.emacs" "c:/Users/shore/AppData/Roaming/.emacs" t t)
load("~/.emacs" t t)
[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()有人能告诉我我的问题在哪里以及如何解决吗?
发布于 2018-10-10 02:33:36
它告诉您,当它试图读取文件archives/gnu/archive-contents时,它希望读取Lisp (更具体地说,是一个Lisp列表)。相反,它遇到了<html> (大概是文件中的文本)。
一种猜测是,您以某种方式下载或获取了一个HTML文件(可能是描述归档文件的HTML文件,或者有下载它的链接),而不是下载或获取Lisp代码的文件。再试一次以获得该存档文件。
https://stackoverflow.com/questions/52731609
复制相似问题