本文介绍了无法打开加载目录详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚通过

M-x package-list-packages

点击包名,然后在新打开的缓冲区中install.

clicked on the package name and then install in the newly opened buffer.

然后我将这些行放入我的 .emacs 中:

Then I put those lines into my .emacs:

(require 'dired-details)
(setq-default dired-details-hidden-string ">---< ")
(dired-details-install)

当我重新启动 emacs 时,出现以下错误:

When I restart emacs, I get the following error:

File error: Cannot open load file, dired-details

有趣的是,当我在上面标记代码区域并应用时

The interesting thing is, that when I mark the code region above and apply

M-x eval-region

一切都按预期进行.

emacs --version
>> GNU Emacs 24.3.1

包版本:

dired-details-20130328.1119

推荐答案

如果你想在 emacs 初始化期间访问你用 package.el 安装的包,需要对其进行初始化.

Packages you installed with package.el need to be initialized if you want to access them during emacs initialization.

添加行

(package-initialize)

到 .emacs 的开头.

to the very beginning of your .emacs .

也按照phil的建议看变量

Also follow phil's recommendation and see the variable

package-enable-at-startup

这篇关于无法打开加载目录详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 20:31