I installed emacs 23.3.1 in c:/emacs-23.3. Following the hints in this page, I updated the site-start.el to set HOME environment variable.
(setenv "HOME" "c:/users/USER/emacs")
And I made c:/users/USER/.emacs (like I did in unix/mac) to write the code for using slime, but it doesn't seem to start slime correctly.
Is this a correct way of setting emacs in Windows 7? Where do I put the .emacs file?
For Windows 10, find the place of the init file or GNU Emacs 25' the place of the . emacs file or . emacs. d folder is in the c:/Users/username/AppData/Roaming .
To create a new file, use Control-X-Control-F, just as if the file already existed. When emacs asks you for the file name, type in the name you want your new file to have, and emacs will create the file, and display an empty buffer for you to type in. Emacs will perform file name completion for you.
Emacs can also look in an XDG-compatible location for init. el , the default is the directory ~/. config/emacs .
emacs. d/ is the location for additional per-user Emacs-specific files written in the Emacs Lisp programming language. Since it is located in the home directory (~/), it is unique for each user, just like the ~/. emacs init file.
You need to set HOME
in environment variables in Computer settings (if I remember correctly), or put init file to default directory (just start Emacs, and press C-x C-f ~/
to see what is actual directory).
And as I remember, on Windows, init file could be called _emacs
...
I am running emacs as a portable app and this works very well for me:
Create a batch file in the root of your emacs directory. For example, I created:
C:\Dropbox\PortableApps\emacs-24.3\run_emacs_portable.bat
Then, edit the file and put this text into it:
set HOME=.\
bin\runemacs.exe %*
Now, I just launch emacs via the run_emacs_portable.bat
file and my HOME folder always points to my emacs installation folder.
The %* allows you to pass arguments to the .bat file and have them forwarded to the runemacs.exe
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