Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
679 views
in Technique[技术] by (71.8m points)

emacs - cannot open load dired-details

I just installed the emacs package dired-details from inside emacs via

M-x package-list-packages

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

Then I put those lines into my .emacs:

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

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

everything works as expected.

emacs --version
>> GNU Emacs 24.3.1

package version:

dired-details-20130328.1119
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

Add the line

(package-initialize)

to the very beginning of your .emacs .

Also follow phil's recommendation and see the variable

package-enable-at-startup

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...