【问题标题】:LISP loads file that does not existLISP 加载不存在的文件
【发布时间】:2022-01-12 21:53:35
【问题描述】:

我正在阅读 Practical Common Lisp 并尝试完成任务,但 Emacs 向我展示了以下内容:

警告(初始化):加载‘/home/username/.emacs’时出错: 文件丢失:无法打开加载文件,Datei oder Verzeichnis nicht gefunden, /home/用户名/quicklisp/slime-helper.el 为确保正常运行,您应该调查并删除 初始化文件中的错误原因。启动 Emacs '--debug-init' 选项可查看完整的错误回溯。

我认为问题是,slimehelper 文件不存在。我该如何解决这个问题?我是编程和 Lisp 的新手,这阻碍了我的学习。当我查看以下视频中的说明时,可能会出现问题

https://www.youtube.com/watch?v=VnWVu8VVDbI

【问题讨论】:

  • 这些是 Emacs 问题,而不是 Common Lisp 问题。尝试在Emacs提问。

标签: debugging emacs


【解决方案1】:

我使用 Portacle 安装了 SBCL / Emacs / SLIME,可用于 Windows、Linux 和 Apple:https://portacle.github.io/

我的电脑是Windows系统。

我的 .emacs 文件看起来像这样,并且没有任何对 slime-helper.el 的引用。我的电脑不包含该文件。也许您可以尝试在 .emacs 文件中注释掉该引用。

(require 'package)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-archives
   (quote
   (("gnu" . "https://elpa.gnu.org/packages/")
    ("melpa" . "https://melpa.org/packages/")))))
 (package-initialize)

 ; your path to SBCL
 (setq inferior-lisp-program "C:/Program Files/Steel Bank Common 
 Lisp/2.0.0/sbcl.exe") ;
 ; your SLIME folder to Emacs load path
 (add-to-list 'load-path "C:/Program Files/slime-2.26.1")
 (require 'slime)
 (slime-setup)

【讨论】:

  • 如何打开 .emacs 文件?
  • 我在 Windows 上的 .emacs 文件位于我的主文件夹 C:\Users\username\.emacs 但您的帖子建议 Linux /home/username/.emacs 您只需编辑它,因为它是文本文件
  • 文件不存在,我认为emacs正在尝试加载一个不存在的文件。解决方案可能是阻止 emacs 尝试加载该文件,但我不知道如何停止加载该文件
猜你喜欢
  • 2011-07-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-10
  • 2011-11-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多