1

I had recently started to get

Warning (initialization): Unable to access `user-emacs-directory' (~/.emacs.d/). 

message upon startup.

I'm on

  • Windows 7 (X64)
  • using the latest x64 emacs-25.0.94.2 build
  • and .21 spacemacs.
  • My $HOME is set to C:\HOME (with the "normal" Windows environment variable way), and in which there is the .emacs.d directory and my not so tailored .spacemacs, which gets processed upon startup,
  • and I can access via dired ~ so I assume that it is set properly.

Could someone point me in the right direction what should I do with it?

2
  • Can you access "dired ~/.emacs.d"? Generally I set HOME to the traditional home directory "C:\Documents and Settings\User" which is a holdover from Windows XP. On Windows 7 you could presumably update this to "C:\Users\User". I think either of these is a better idea than the root directory.
    – InHarmsWay
    Jun 25, 2016 at 11:00
  • Thanks @InHarmsWay ou had pointed out that I don't have access to ~/.emacs.d only in emacs, because for some reason it had belonged to the domain administrator's user. I had reowned it and now the warning had gone, and I have access to it. Please add your answer so I can accept it! Jun 25, 2016 at 12:51

2 Answers 2

2

Generally I set HOME to the traditional home directory

C:\Documents and Settings\User

which is a holdover from Windows XP. On Windows 7 and later you could presumably update this (although I haven't tried this) to

C:\Users\User

I think either of these is a better idea than something in the root directory.

1
2

I use symlinks to link ~/.emacs and ~/.emacs.d to the actual files which are stored elsewhere. I had used:

cmd /c mklink C:\Users\<me>\.emacs.d C:\<elsewhere>\.emacs.d

to create the link, but you actually need to create a hard link to the directory (or junction as Windows calls them) with the /J flag:

cmd /c mklink /J C:\Users\<me>\.emacs.d C:\<elsewhere>\.emacs.d

I also created a hard link to my .emacs file with the /H flag:

cmd /c mklink /H C:\Users\<me>\.emacs C:\<elsewhere>\.emacs

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.