Reputation: 423
I am a newbie Emacs user, and have a problem when trying to install a new Emacs package. The package is https://github.com/tlh/workgroups.el. I followed the file installation instructions in the accompanying README.md file: I copied the content of the "workgroup.el" into a new textfile with the same name, saved it to the same directory as my init.el file ("Put workgroups.el somewhere on your Emacs load path"), and added (require 'workgroups) to my init.el file ("Add this line to your .emacs file: (require 'workgroups)").
However, when saving and closing Emacs, and then opening my init file I get the following error message
"File error: Cannot open load file, no such file or directory, workgroups "
Why doesn't Emacs recognize the new package?
Thanks in advance for any help : )
Upvotes: 1
Views: 338
Reputation: 73236
The directory where your init file lives (which is either your home directory or your ~/.emacs.d
directory) is not in your Emacs load-path
by default, and should not be added to it. (Recent versions of Emacs will complain if you do that.)
Instead place the new elisp library into a sub-directory named something like ~/.emacs.d/lisp
, and add that to your load-path
, by adding the following to your init file:
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp"))
Upvotes: 2