Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot open load file when using emacs

Tags:

emacs

emacs23

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?

like image 361
ant2009 Avatar asked Jun 14 '11 06:06

ant2009


3 Answers

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?

like image 130
Lindydancer Avatar answered Oct 31 '22 11:10

Lindydancer


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.

like image 9
Jeevan Pingali Avatar answered Oct 31 '22 12:10

Jeevan Pingali


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.)

like image 7
Brady Trainor Avatar answered Oct 31 '22 12:10

Brady Trainor