Subject: Re: bug#16087: Setting HOME environment variable in Emacs on Windows has side effects

From: Eli Zaretskii <[email-masked]>
Date: Mon, 09 Dec 2013 05:43:13 +0200

> Date: Sun, 08 Dec 2013 16:14:11 -0500
> From: SDS <[email-masked]>
> CC: [email-masked]
> 
> > Thanks.  So this sounds like a one-time issue, which, once solved to
> > your satisfaction, should never pop up again, right?
> 
> A workaround which directly or indirectly prevents this from happening 
> is fine. It hasn't even really been an issue unless I'm trying to access 
> files within the directory containing the .emacs.d for NT-Emacs. I 
> noticed it when I tried to open .emacs.d/init.el for NT-Emacs and it 
> opened the init.el for Emacs-w32 instead.
> 
> I could isolate the .emacs.d for NT-Emacs inside its own directory, and 
> point to that in HKCU\SOFTWARE\GNU\Emacs\HOME before changing HOME in 
> init.el. That way it's only a problem when trying to edit the init.el 
> for NT-Emacs, which I could workaround by invoking NT-Emacs with --no-init.

I don't understand why you need to use HOME or the Registry to access
any directory on your system.  Each one of them has its own unique
absolute file name, doesn't it?  Just use that.  What am I missing?

> > As for setting this up, my suggestion would be to set HOME in the
> > environment to point to the Cygwin's HOME, and augment that by
> > whatever you need in the Bash init files.
> 
> Won't that require merging the .emacs.d directories for the two ports? 
> Is there a way of doing this without having them interfere with each other?

Depends on what you have in that directory.  In general, I see no
reasons why two builds couldn't use the same .emacs.d.  Which parts do
you think will cause trouble?