4

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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