GNU bug report logs - #16087
Setting HOME environment variable in Emacs on Windows has side effects

Previous Next

Package: emacs;

Reported by: SDS <sds.biz.main <at> gmail.com>

Date: Sun, 8 Dec 2013 07:12:02 UTC

Severity: minor

Tags: wontfix

Found in version 24.3.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: SDS <sds.biz.main <at> gmail.com>
To: eliz <at> gnu.org
Cc: 16087 <at> debbugs.gnu.org
Subject: bug#16087: Re: bug#16087: Setting HOME environment variable in Emacs on Windows has side effects
Date: Sun, 08 Dec 2013 14:44:55 -0500
On 12/8/2013 12:38 PM, Eli Zaretskii wrote:
> OTOH, the use case for supporting such a strange change in the middle
> of an Emacs session is entirely not clear to me.  On the contrary, it
> seems to me like doing this is asking for a lot of trouble, and not
> only in Emacs (because 'setenv' modifies process-environment, so every
> subprocess will get this new value of HOME, so, e.g., the shell will
> not find its init files). Could you please describe why you needed
> this?

On Windows, I have two versions of Emacs running: a Cygwin port 
(Emacs-w32) and a GNU port (NT-Emacs). I was originally using Emacs-w32 
because it supports some Cygwin utilities that aren't supported by 
NT-Emacs (e.g. Cygwin bash, Cygwin OpenSSH). However, Cygwin's port was 
aborting frequently. The Cygwin Emacs maintainer said it was another 
application interfering, but I had removed all that I had installed from 
their list of such applications (BLODA) and it hadn't fixed the 
aborting. I didn't have the time to debug the issue any further, so I 
decided to switch workflow to NT-Emacs until I could fix Emacs-w32.

At the moment, I have two separate .emacs.d directories for each of the 
two ports. I didn't want to use a single .emacs.d directory for both 
ports because I'm not sure if they would play nicely with each other. I 
also don't want issues with one to be carried over to the other. So I 
have my HKCU\SOFTWARE\GNU\Emacs\HOME registry key pointing to a 
directory with the .emacs.d for NT-Emacs, while my .emacs.d for 
Emacs-w32 is in my Cygwin HOME directory.

Ultimately, I'd like my HOME variable in NT-Emacs to point to the Cygwin 
HOME directory. This allows any Cygwin utilities used by NT-Emacs to 
have HOME set correctly. Also, I'd like ~ to be set to the Cygwin HOME 
directory. I tried changing it in init.el, and that's where this issue 
arose.


Cheers,

SDS




This bug report was last modified 11 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.