cannot open load file when using emacs
Asked Answered
K

4

20
GNU Emacs 23.2.1

I have downloaded rainbow-delimiters.el and put into the following directory:

~/.emacs.d/site-list/rainbow/

In my emacs configuration file, I have the following:

(add-to-list 'load-path "~/.emacs.d/site-list/rainbow")
(require 'rainbow-delimiters)

However, when I try and start emacs I get the following error:

File error: Cannot open load file, rainbow-delimiters

Can anyone point me in the right direction?

Kerseymere answered 14/6, 2011 at 6:50 Comment(0)
S
17

The code looks all-right, I would put my money on a typo. In fact, the traditional name is site-lisp (i.e. with a p and not a t), maybe you put the file in site-lisp but wrote site-list in your init file?

Subjection answered 14/6, 2011 at 7:56 Comment(0)
G
10

You can try giving the load path to the file, rather than the folder like,

(add-to-list 'load-path "~/.emacs.d/site-list/rainbow/rainbow-delimiters.el") (require 'rainbow-delimiters)

If you have already set up the Emacs startup kit (https://github.com/technomancy/emacs-starter-kit) or a fork of it, you can install rainbow delimiters like below:

  1. M-x package-list-packages (this opens a buffer with list of installable packages)
  2. Search for rainbow (C-s rainbow)
  3. Once found the package, press "I" to mark for installation
  4. And press "X" to start the package installation

The above steps will install, also load the package (evaluates the file buffer) and the rainbow delimiters is ready for use.

Geyserite answered 14/6, 2011 at 7:44 Comment(2)
During my testing I did include the file name. However, I had the same problem. I am interested to try you second method when I get more time later today. Thanks.Kerseymere
This should be the highest answer. I've been using emacs for literally 20 years, and I had no idea this resource existed. Thank you for posting this.Marauding
A
7

I was trying to start over with a minimal new init file, and was getting Cannot open load file for (require 'dired-details).

Realized I forgot to include (package-initialize) in my init file. (Necessary since that is the manager I am using.)

Aha answered 16/6, 2014 at 22:8 Comment(0)
H
1

I had the same problem ( Cannot open load file silentcomp.el ) for Emacs Code Browser,ECB. It was due to incorrect file permission.

Check the read permissions for rainbow-delimiters.el and other .el files

Howard answered 8/12, 2012 at 7:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.