Hi all so last night I started using Emacs and I enjoyed it. Now I am looking to customize the look to the solarized port of Emacs. Now question is where is the .emacs file in windows 8.1? I have heard many answers to this question, I put my Emacs in C:\Emacs. So any ideas?
Asked
Active
Viewed 702 times
2
Dailan Kifki
- 103
- 4
Wesley Pennock
- 29
- 1
3 Answers
2
From inside Emacs, you can find out the path and file name with this command:
C-h v user-init-file RET
Newer installations generally default to ~/.emacs.d but some custom installs put it in roaming or dropbox folders.
Emacs User
- 5,643
- 18
- 48
-
1You say "default to ~/.emacs.d" but that seems to bring us back to the original question of where is "~/.emacs(.d)" – Dailan Kifki Dec 05 '17 at 22:54
2
You don't really need to know: just do C-x C-f ~/.emacs RET and you'll be looking at the content of the file (most likely empty if you haven't done that earlier), which you can then edit and save.
Once in it, you can use M-x pwd RET to know in which directory it is placed.
Stefan
- 26,404
- 3
- 48
- 85
0
Most likely, it is located in your %USERPROFILE% or %APPDATA% dir. However, any of the following(those are already mentioned above, just summarizing here) can be used to find out the exact location:
- Type
C-h v user-init-file RET. This will open a help window which will have the location of the init file. TypeC-x 1orC-x k *Help* RETto close the popup window. - Run the eval command with
M-: (getenv "HOME") RETwhich will also give the init file location. Don't forget the parentheses because it is a lisp expression.
Thanks.
Samrat Debroy
- 113
- 3
M-: (getenv "HOME"). This will output the location of home directory, which is the directory where you can put.emacsfile or any other kind of init file. – wvxvw Jun 27 '15 at 21:04(emacs) Windows HOMEand(efaq-w32) Location of init file. – Basil Dec 05 '17 at 17:27