使用 emacs 时无法打开加载文件
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
代码看起来没问题,我愿意把钱押在拼写错误上。事实上,传统的名称是
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 ap
and not at
), maybe you put the file insite-lisp
but wrotesite-list
in your init file?您可以尝试提供文件的加载路径,而不是像这样的文件夹,
(add-to-list 'load-path "~/.emacs.d/site-list/rainbow/rainbow-delimiters.el")
(需要 'rainbow-delimiters)
如果您已经设置了 Emacs 启动工具包 (https://github.com/technomancy/emacs-starter-kit) 或其分支,您可以安装如下彩虹分隔符:
Cs Rainbow
)上述步骤将安装,同时加载软件包(评估文件缓冲区)并且彩虹分隔符可供使用。
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:
package-list-packages
(this opens a buffer with list of installable packages)C-s rainbow
)The above steps will install, also load the package (evaluates the file buffer) and the rainbow delimiters is ready for use.
我试图用一个最小的新初始化文件重新开始,并且得到
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.)我在 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