Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using emacs24, and I started using elpa to download the packages to ~/.emacs.d/elpa folder.

How can I load these packages?

For instance, I have tried (see below) for rainbow-delimiter but it doesn't work. I have tried commenting out a few lines and keeping others but nothing sticks.

;; Paren checking                                                                    
(add-to-list 'load-path "~/.emacs.d/elpa/")                 
(require 'rainbow-delimiters)                                                       
(autoloads (global-rainbow-delimiters-mode rainbow-delimiters-mode-enable           
                                           rainbow-delimiters-mode)                                                                
(global-rainbow-delimiters-mode)                                                    
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)                                 
;(add-hook 'emacs-lisp-mode-hook 'paredit-mode)                                      
(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode)                           
share|improve this question

1 Answer 1

up vote 2 down vote accepted

If you're using the default elpa settings, the .el files will be installed in subdirectories of ~/.emacs.d/elpa. When you use require, it doesn't recursively search the directories in your load path. To get this effect, you can use the following snippet:

(let ((default-directory "~/.emacs.d/elpa"))
  (normal-top-level-add-subdirs-to-load-path))
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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