I have been using emacs for a long time in windows. (windows 10 on an HP laptop PC) My .emacs file is in c:.emacs.

Up until yesterday, the file was run whenever I started up emacs. But yesterday it failed to run, so I have to manually run it.

The .emacs (and _emacs) file is visible within emacs when I do a directory listing of c:

-rw-rw-rw- 1 Ray Voith None 6670 2014-06-14 .emacs

-rw-rw-rw- 1 Ray Voith None 6605 2014-06-14 _emacs

but is not visible within cygwin in directory /cygdrive/c I tried chmod 777 .emacs (also chmod 777 _emacs) within cygwin but it says

$ chmod 777 _emacs

chmod: changing permissions of ‘_emacs’: Permission denied

Ray Voith@laptop /cygdrive/c

$ chmod 777 .emacs

chmod: cannot access ‘.emacs’: No such file or directory

I have not intentionally done anything to the .emacs file.

Does anyone know why emacs would all of a sudden stop executing .emacs?

  • Not sure why it worked before and then stopped working – Ray Voith Dec 19 '15 at 21:53

Set your MS Windows HOME environment variable to point to the folder where you store your init file (e.g., .emacs). This is apparently C:\, for you.

C:\ is the place where users put their init files in the past, but it is not necessarily the best place to do so. I recommend that you do this:

  1. Set your to HOME environment variable to something like d:\usr\yourusername\. Your user name here can be any name you like. In other words, just set HOME to some folder explicitly.

    You can use System > Advanced system settings > Environment Variables > User Variables to do this. Just add a HOME variable if none is there.

  2. Be sure to make yourself the owner of that entire folder, including all its subfolders.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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