> From: Lubos Pintes <lubos.pin...@gmail.com> > Date: Sat, 28 Nov 2015 09:46:04 +0100 > > What about this setup? (I'm not absolutely sure it is correct) > 1. Download the emacs distro and unpack it somewhere. Let call this > directory <emacs>. > > 2. Create the <emacs>\home folder. > > 3. Create the <emacs>\share\emacs\site-lisp\site-start.el with this > content on the first line: > (setenv "HOME" (concat (expand-file-name (concat (file-name-directory > load-file-name) "../../..")) "/home")) > > 4. Now your .emacs.d directory will be under <emacs>\home. And every > package you install, etc., will be ready for backup. What do you think > about this?
If you set HOME inside Emacs init files, Emacs _will_ try accessing the C:\Users tree at startup. That's because the startup code needs to have HOME before it processes init files. The _only_ safe way of avoiding the access to C:\Users is to have HOME set in the environment _before_ Emacs starts.