Go to the first, previous, next, last section, table of contents.
Normally Emacs uses the environment variable HOME
to find
`.emacs'; that's what `~' means in a file name. But if you
have done su
, Emacs tries to find your own `.emacs', not
that of the user you are currently pretending to be. The idea is
that you should get your own editor customizations even if you are
running as the super user.
More precisely, Emacs first determines which user's init file to use.
It gets the user name from the environment variables LOGNAME
and
USER
; if neither of those exists, it uses effective user-ID.
If that user name matches the real user-ID, then Emacs uses HOME
;
otherwise, it looks up the home directory corresponding to that user
name in the system's data base of users.
If you type an Emacs command you did not intend, the results are often mysterious. This chapter tells what you can do to cancel your mistake or recover from a mysterious situation. Emacs bugs and system crashes are also considered.
Go to the first, previous, next, last section, table of contents.