Chris Kavanagh
Chris Kavanagh

Reputation: 449

Emacs 24.3 dired+ won't load

I installed dired+ through list-packages (the folder was put in the elpa folder), and put '(add-to-list 'load-path "~/.emacs.d/elpa/")' in my init file (which I created myself), and '(require 'dired+) under. When I open emacs, I get an error telling me there's an error in my init file. If I remove the '(require 'dired+) line, the error stops, but again dired+ doesn't work when I call dired mode. The actual folder that was downloaded when I installed it is 'dired+-20130206.1702'. So I tried '(require dired+-20130206.1702), which again gave me an error on startup.

I'm at my wits end. I've tried everything I can think of, gone through the GNU emacs docs, googled the problem, looked at the answers here at Stack, and no luck. Does anyone have any suggestions? I'm using Windows XP.

Upvotes: 2

Views: 890

Answers (2)

Drew
Drew

Reputation: 30701

I think Phils answered your question wrt loading Dired+ (specify the right directory, the one where you put dired+.el).

Wrt Menu-bar+, the feature name is menu-bar+, not menubarplus and not menu-barplus. So change your (require 'menubarplus) to (require 'menu-bar+).

Upvotes: 0

phils
phils

Reputation: 73274

It's impossible to say for certain without seeing all the code, but you appear to be quoting your forms for no reason.

i.e., these:

'(add-to-list 'load-path "~/.emacs.d/elpa/")
'(require 'dired+)

should be:

(add-to-list 'load-path "~/.emacs.d/elpa/")
(require 'dired+)

However that should just make them ineffectual, rather than causing errors directly.

Show us the code and the error message.

Edit:

Adding the /dired+/ to the end seemed to fix it ... Although I have no idea why. Any thoughts?

load-path holds a list of directories in which Emacs will look for libraries. It does not automatically descend into sub-directories, so you need to specify all relevant directories for your libraries. Your dired+ library is clearly in the ~/.emacs.d/elpa/dired+/ directory.

For menubarplus, you will similarly need to check to see which directory the library is in.

To be honest, I had thought that the package management in Emacs 24 would take care of this automatically; but as I've not been using it, I'm not certain.

Edit 2:

Yes, I suspect you have some other problem here. I just experimented with installing a library via the package manager (albeit from the default package repository, which doesn't include a dired+ package), and after restarting Emacs load-path contained the path for the new library without any intervention on my part.

Upvotes: 0

Related Questions