繁体   English   中英

Emacs无法加载初始化文件

[英]Emacs failed to load initialization file

我在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.

按照指示,我使用--debug-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()

谁能告诉我我的问题在哪里以及如何解决?

它告诉您,当它尝试读取文件archives/gnu/archive-contents它希望读取Lisp(更具体地说是Lisp列表)。 相反,它遇到了<html> (可能是文件中的文本)。

猜测是您以某种方式下载或获取了HTML文件(也许是描述存档文件或具有下载链接的HTML文件),而不是下载或获取了Lisp代码文件。 再次尝试获取该存档文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM