Home » Questions » Computers [ Ask a new question ]

Emacs fails to load (.emacs) configuration file

Emacs fails to load (.emacs) configuration file

I am using Emacs on Ubuntu 9.04.

Asked by: Guest | Views: 167
Total answers/comments: 3
Guest [Entry]

"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."
Guest [Entry]

"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."
Guest [Entry]

"I had this problem too, when switching into a container.

It turned out, that the environment wasn't set up properly, and the USER and HOME variable still pointed to the root user, even though I was logged in as my working user.

Doing a su - <username> fixed it, because now the environment was initialized as expected."