Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several config files in ~.emacs.d/elisp/. I want to load them on emacs startup. I'm using this line:

(add-to-list 'load-path "~/.emacs.d/elisp/")

I assume that adds the contents of the directory to the files loaded at startup. But the files are not loaded. Why?

share|improve this question
up vote 4 down vote accepted

emacs doesn't load automatically. you should explicitly ask emacs to load a file.

eg: to load a feature.el in ~/.emacs.d/elisp directory
you can say..

(add-to-list 'load-path "~/.emacs.d/elisp/")
(require 'feature)
share|improve this answer
2  
And if it is just a config file (not an emacs extension/package providing a feature), you may need (load-file "~/.emacs.d/elisp/mysettings"). require will work anyway (see the doc for require), but just as a fallback mechanism. – Juancho Jul 30 '11 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .