使用 emacs 时无法打开加载文件

发布于 2024-11-15 05:11:07 字数 435 浏览 5 评论 0原文

GNU Emacs 23.2.1

我已经下载了 rainbow-delimiters.el 并放入以下目录:

~/.emacs.d/site-list/rainbow/

在我的 emacs 配置文件中,我有以下内容:

(add-to-list 'load-path "~/.emacs.d/site-list/rainbow")
(require 'rainbow-delimiters)

但是,当我尝试启动 emacs 时,出现以下错误:

File error: Cannot open load file, rainbow-delimiters

谁能指出我的方向正确吗?

GNU Emacs 23.2.1

I have downloaded rainbow-delimiters.el and put into the following directory:

~/.emacs.d/site-list/rainbow/

In my emacs configuration file, I have the following:

(add-to-list 'load-path "~/.emacs.d/site-list/rainbow")
(require 'rainbow-delimiters)

However, when I try and start emacs I get the following error:

File error: Cannot open load file, rainbow-delimiters

Can anyone point me in the right direction?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

星星的轨迹 2024-11-22 05:11:07

代码看起来没问题,我愿意把钱押在拼写错误上。事实上,传统的名称是 site-lisp (即带有 p 而不是 t),也许你把文件放在 >site-lisp 但在你的 init 文件中写入了 site-list

The code looks all-right, I would put my money on a typo. In fact, the traditional name is site-lisp (i.e. with a p and not a t), maybe you put the file in site-lisp but wrote site-list in your init file?

灵芸 2024-11-22 05:11:07

您可以尝试提供文件的加载路径,而不是像这样的文件夹,

(add-to-list 'load-path "~/.emacs.d/site-list/rainbow/rainbow-delimiters.el")
(需要 'rainbow-delimiters)

如果您已经设置了 Emacs 启动工具包 (https://github.com/technomancy/emacs-starter-kit) 或其分支,您可以安装如下彩虹分隔符:

  1. Mx < code>package-list-packages (这将打开一个包含可安装软件包列表的缓冲区)
  2. 搜索 Rainbow (Cs Rainbow)
  3. 找到软件包后,按“I”标记安装
  4. 并且按“X”开始软件包安装

上述步骤将安装,同时加载软件包(评估文件缓冲区)并且彩虹分隔符可供使用。

You can try giving the load path to the file, rather than the folder like,

(add-to-list 'load-path "~/.emacs.d/site-list/rainbow/rainbow-delimiters.el")
(require 'rainbow-delimiters)

If you have already set up the Emacs startup kit (https://github.com/technomancy/emacs-starter-kit) or a fork of it, you can install rainbow delimiters like below:

  1. M-x package-list-packages (this opens a buffer with list of installable packages)
  2. Search for rainbow (C-s rainbow)
  3. Once found the package, press "I" to mark for installation
  4. And press "X" to start the package installation

The above steps will install, also load the package (evaluates the file buffer) and the rainbow delimiters is ready for use.

二智少女 2024-11-22 05:11:07

我试图用一个最小的新初始化文件重新开始,并且得到 Cannot open load file for (require 'dired-details)

意识到我忘记在我的初始化文件中包含 (package-initialize) 。 (这是必要的,因为这是我正在使用的经理。)

I was trying to start over with a minimal new init file, and was getting Cannot open load file for (require 'dired-details).

Realized I forgot to include (package-initialize) in my init file. (Necessary since that is the manager I am using.)

森林散布 2024-11-22 05:11:07

我在 Emacs 代码浏览器、ECB 上遇到了同样的问题(无法打开加载文件silentcomp.el)。
这是由于文件权限不正确造成的。

检查 Rainbow-delimiters.el 和其他 .el 文件的读取权限

I had the same problem ( Cannot open load file silentcomp.el ) for Emacs Code Browser,ECB.
It was due to incorrect file permission.

Check the read permissions for rainbow-delimiters.el and other .el files

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文