首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Emacs未能加载初始化文件

Emacs未能加载初始化文件
EN

Stack Overflow用户
提问于 2018-10-10 02:08:15
回答 1查看 622关注 0票数 0

我在windows 10平台下使用Emacs 25.3。

它可以正常工作,直到有一次我启动它并得到以下消息:

代码语言:javascript
复制
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选项启动并获得以下消息:

代码语言:javascript
复制
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()

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-10-10 02:33:36

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

一种猜测是,您以某种方式下载或获取了一个HTML文件(可能是描述归档文件的HTML文件,或者有下载它的链接),而不是下载或获取Lisp代码的文件。再试一次以获得该存档文件。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52731609

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档