tags:

views:

161

answers:

2

Where is the .emacs file in windows (I'm using Emacs-23-CvsP091103-EmacsW32-1.58 )

When Emacs starts up, it attempts to load and execute the contents of a file commonly called .emacs (though it may have other names, see Where do I put my init file?) which contains any customizations you have made. You can manually add lisp code to your .emacs, or you can use the Customization interface accessible from the Options menu. If the file does not exist, Emacs will start with the default settings.

+9  A: 

In your home directory. You can set this directory by setting the HOME environment variable. If home isn't set, it will look in your Application Data directory. On XP, that's something like C:\Documents and Settings\<username>\Application Data, on Vista and later C:\Users\<username>\AppData.

If you open up emacs, and try editing (with C-x C-f) ~/.emacs, that should generally open up the .emacs that Emacs will be loading.

See the Windows Emacs FAQ for more details.

To set the HOME environment variable, open the System Control Panel, go to the Advanced tab, click Environment Variables, then click the New button in the "User variables" section.

Brian Campbell
A: 

My version of emacs on windows (22.3.1) places the init file there: ~/.emacs/init.el

(see Brian Campbell's post for the definition of ~, which is HOME).

Gauthier