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.
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.
The best way to find out where .emacs
resides by default on a particular system is without a doubt C-h v user-emacs-directory. The user-emacs-directory
variable is platform dependent and is helpful on each and every OS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With