Red Hat Bugzilla – Bug 602235
emacs under root using the wrong config file
Last modified: 2014-09-30 19:39:07 EDT
1) gnome terminal is running
2) I do su, enter password, become root
3) $ emacs something
4) I get:
Warning (initialization): An error occurred while loading `/home/akozumpl/.emacs':
The point is, I am root, $HOME is /root etc. so no matter what emacs thinks I am, the config should be loaded from /root/.emacs. the non-root config file can reference $HOME so if this is an intended feature it doesn't work anyway.
su with out the -l starts a non login shell, and so root's startup files are not read. So this is working as designed - you need to use su -l.