I use Emacs 24.4 on Ubuntu and Windows with virtually identical init files. The following snippet is not loading correctly on Windows:

(require 'dired+)
(diredp-toggle-find-file-reuse-dir 1)

The intent is to use the same buffer while navigating folders in dired+. It is working as expected on my home machine running Ubuntu, but it gives the following error on the work computer running Windows:

File error: Cannot open load file, no such file or directory, dired+

I do have dired+ installed, and it runs when evaluating the same section in Emacs after it has opened. However, it's not being recognized during startup. Has anyone faced this problem with dired+, and is there a way to load it properly on Windows?

  • Since you have accepted an answer, presumably the problem is solved. You might want to indicate what was wrong - either in what you were doing or in what you were understanding, to further help others. – Drew Mar 2 '15 at 16:11
  • @Drew My mistake was not calling (package-initialize) earlier in the init file, though it worked on Ubuntu. Is this comment indicative enough, or is it better to include an edit or an answer? – Tymric Mar 2 '15 at 16:30

Here are few things to check when debugging why an installed package is not found by emacs:

  • Install the package using the in-built package manager.
  • Ensure that the parent folder of the package's installed folder is set to the package-user-dir variable (this is set to ~/.emacs.d/elpa by default).
  • You then need to do (package-initialize) to load the packages in that path and activate them.

package-initialize is an interactive autoloaded compiled Lisp function in `package.el'.

(package-initialize &optional NO-ACTIVATE)

For more information check the manuals.

Load Emacs Lisp packages, and activate them. The variable `package-load-list' controls which packages to load. If optional arg NO-ACTIVATE is non-nil, don't activate packages.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.