On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a dot. Some users prefer to continue using such a name due to historical problems various Windows tools had in the past with file names that begin with a dot. In Emacs 22 and later, the init file may also be called .emacs.d/init.el. Many of the other files that are created by lisp packages are now stored in the .emacs.d directory too, so this keeps all your Emacs related files in one place.
All the files mentioned above should go in your
HOME directory. The
HOME directory is determined by following the steps below:
HOMEis set, use the directory it indicates.
HKCU\SOFTWARE\GNU\Emacs\HOMEis set, use the directory it indicates.
HKLM\SOFTWARE\GNU\Emacs\HOMEis set, use the directory it indicates. Not recommended, as it results in users sharing the same HOME directory.
HOMEwas not set.
Within Emacs, ~ at the beginning of a file name is expanded to your
HOME directory, so you can always find your .emacs file by typing the command C-x C-f ~/.emacs.