Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
    

3 Answers 3

up vote 4 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

"site-lisp"

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

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.