I tried looking for the .emacs file for my Windows installation for Emacs, but I could not find it. Does it have the same filename under Windows as in Unix?
Do I have to create it myself? If so, under what specific directory does it go?
Copy and pasted from the Emacs FAQ, http://www.gnu.org/software/emacs/windows/:
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, because Windows Explorer cannot create a file with a name starting with a dot, even though the filesystem and most other programs can handle it. 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:
C:\.emacs
exists, then use C:/
. This is for backward compatibility, as previous versions defaulted to C:/
if HOME was 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 with C-x C-f ~/.emacs
.
There's further information at HOME and Startup Directories on MS-Windows.