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'm trying to create a custome ''.el'' path for Emacs. I'm following emacs wiki instructions about generic mode. When I try to load the mode Emacs doesn't find it. (I have placed the file in .emacs.d folder). So I tried what is explained here which only cause an error when Emacs load.

While at it. Is there a way to reload my init file while Emacs run?

I'm trying this on arch-linux. When I try to load the file using require I can an error that the file does not exist. I tried load instead and this work.

share|improve this question
It's usually a good idea to mention what OS you are running and what any error messages say. – Nifle Feb 12 '12 at 10:12
@Peter.O: Thanks. I want to reload the setting, not to re-read it into buffer – Yotam Feb 12 '12 at 14:30
up vote 5 down vote accepted

Put this in your .emacs

;;; Set location for external packages.
(add-to-list 'load-path "~/.emacs.d")
share|improve this answer

The subdirectory under your emacs installation called


is where custom libraries are stored. Copy your .el file there and in your .emacs file, you can load the file without specifying the path. like this:

(load-library "my-file")

where my-file is my-file.el

share|improve this answer

You can go to the end parenthesis and evaluate the buffer using either C-x-C-e or you can use M-x eval-buffer

share|improve this answer

You must log in to answer this question.

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