18
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?

nbro
  • 15,395
  • 32
  • 113
  • 196
ant2009
  • 27,094
  • 154
  • 411
  • 609

4 Answers4

16

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?

Lindydancer
  • 25,428
  • 4
  • 49
  • 68
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.

Jeevan Pingali
  • 1,072
  • 1
  • 9
  • 11
  • 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. – ant2009 Jun 14 '11 at 08:00
  • 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. – aeu Jan 12 '16 at 15:49
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.)

Brady Trainor
  • 2,026
  • 20
  • 18
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

Anish
  • 1,490
  • 1
  • 13
  • 13