On Wed, Jun 8, 2016 at 12:40 PM, Eli Zaretskii wrote: > I don't think we want to have environment-related functions that are > specific to Windows, that goes against the goal of portability of > Emacs packages. > > I'm okay with considering patches specific to w32 that would eliminate > the need for pushing variables into the environment of subprocesses, > and/or leave initial-environment unaffected by the pushed values How about splitting apart initialization of Vinitial_environment and Vprocess_environment and moving the former earlier so that it's unaffected by Emacs' manipulations of the environment? See attached patch. > I guess you refer to the fact that msysgit uses $USERPROFILE as the > alternative home directory if $HOME is not set? If so, I'd rather > suggest to report a bug to msysgit maintainers: they are behaving > against platform recommendations. [...] > If you look in the $USERPROFILE directory on a typical Windows > machine, you won't see there any sub-directory or file created by an > application, only a few standard sub-directories. Applications do > generally follow the above recommendations; for example, I have > Firefox installed, which keeps my customizations in > $APPDATA/Mozilla/Firefox/Profiles/. So Git is the odd one out if it > puts its ~/.gitconfig file in $USERPROFILE. To me it makes sense to have $HOME map to $USERPROFILE, and $APPDATA is like $XDG_CONFIG_HOME (usually ~/.config/ on GNU/Linux). However, this is purely subjective as there are no platform recommendations about translating environment variables to other platforms.