2

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?

3

3 Answers 3

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.

1
  • 1
    You say "default to ~/.emacs.d" but that seems to bring us back to the original question of where is "~/.emacs(.d)" Commented Dec 5, 2017 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.

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:

  1. Type C-h v user-init-file RET. This will open a help window which will have the location of the init file. Type C-x 1 or C-x k *Help* RET to close the popup window.
  2. Run the eval command with M-: (getenv "HOME") RET which will also give the init file location. Don't forget the parentheses because it is a lisp expression.

Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.