GNU bug report logs -
#10980
23.4; Variable init_environment incorrectly set
Previous Next
Reported by: "Bo Johansson" <bo.johansson <at> lsn.se>
Date: Fri, 9 Mar 2012 17:16:03 UTC
Severity: wishlist
Tags: patch
Found in version 23.4
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Date: Mon, 20 Jun 2016 20:23:26 -0400
> Cc: 10980 <at> debbugs.gnu.org, bo.johansson <at> lsn.se
>
> > 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.
Thanks. However, I wonder if we could do better. First, your patch
only fixed initial-environment, which means Lisp applications will
need to explicitly use it, and probably only on Windows, something
that is not the best solution, IMO. I hoped we could come up with a
way of pushing the additional variables into Emacs's own environment
after Vprocess_environment is already computed -- can you try doing
that?
In any case, the reasons for calling the same function twice in two
different places should be explained, at least in the comments, or
else someone might become confused at some future point in time.
Better yet, perhaps only the Windows build should do something like
that, and the other platforms could continue using the current code
mostly unaltered, as they don't need this.
> > 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.
I quoted the platform recommendations that discourage putting files
directly under $USERPROFILE, and most programs, including those ported
from Posix platforms, do seem to follow those recommendations.
This bug report was last modified 8 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.