Emacs fails to load (.emacs) configuration file

Your init file contains personal EmacsLisp code that you want to execute when you start Emacs.

  • For GnuEmacs, it is ~/.emacs or _emacs or ~/.emacs.d/init.el.
  • For XEmacs, it is ~/.xemacs or ~/.xemacs/init.el.

Torok Gabor's answer is what you are looking for. I only wish to point out a minor typo in your init file, it should be

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

As Török said, probably you need to rename emacs to init.el.

One thing that drove me crazy for a while is that if ~/.emacs exists then emacs doesn't load ~/.emacs.d/init.el. So, if you have a ~/.emacs either delete it and move its contents into the other file, or (load "~/.emacs.d/init.el") inside ~/.emacs.

Tags:

Emacs