From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10980: GNU bugs information: logs for bug#10980 Date: Wed, 08 Jun 2016 19:40:24 +0300 Message-ID: <83twh3r5vr.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1465404110 23921 80.91.229.3 (8 Jun 2016 16:41:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2016 16:41:50 +0000 (UTC) Cc: bo.johansson@lsn.se, 10980@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 08 18:41:38 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bAgXu-00046y-GD for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jun 2016 18:41:34 +0200 Original-Received: from localhost ([::1]:58399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAgXt-0007EW-QZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jun 2016 12:41:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAgXT-0006wB-Au for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2016 12:41:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAgXO-0007Ai-8m for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2016 12:41:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAgXO-0007Ae-5V for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2016 12:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bAgXN-0007CI-Ub for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2016 12:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jun 2016 16:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10980-submit@debbugs.gnu.org id=B10980.146540401827604 (code B ref 10980); Wed, 08 Jun 2016 16:41:01 +0000 Original-Received: (at 10980) by debbugs.gnu.org; 8 Jun 2016 16:40:18 +0000 Original-Received: from localhost ([127.0.0.1]:33032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAgWf-0007B9-Tb for submit@debbugs.gnu.org; Wed, 08 Jun 2016 12:40:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAgWe-0007Ax-Bs for 10980@debbugs.gnu.org; Wed, 08 Jun 2016 12:40:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAgWU-00070P-8F for 10980@debbugs.gnu.org; Wed, 08 Jun 2016 12:40:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAgWA-0006rj-Tv; Wed, 08 Jun 2016 12:39:46 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1374 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bAgWA-0007tp-27; Wed, 08 Jun 2016 12:39:46 -0400 In-reply-to: (message from Noam Postavsky on Tue, 7 Jun 2016 23:54:17 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119281 Archived-At: > From: Noam Postavsky > Date: Tue, 7 Jun 2016 23:54:17 -0400 > Cc: bo.johansson@lsn.se > > > My idea to get a read-only "inherited environment" is: > > 1) To save the "inherited environment" early in "c-code" at start up of > > Emacs > > 2) Implement a lisp function which can return the saved "inherited > > environment". > > > > The new read-only "inherited environment" can then later be used to start > > external processes with a more "transparent" environment. > > To start to change the current handling of the variable initial-environment > > is probably difficult and error prone. > > > > I read this as a feature request to let lisp programs be able to see > the environment from before Emacs startup routines have changed it. 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, but no one has stepped forward for the job. > I have an additional use case for this: in magit it would be useful > to see if the user has HOME or if they just let Emacs choose a > default value for it. In the latter case, I would pop up a warning > to tell them not to do that because git chooses a different default > value HOME, and having disagreement causes confusion (of the "why > does X work from command line and not in magit?" variety). 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. From https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx: CSIDL_PROFILE FOLDERID_Profile The user's profile folder. A typical path is C:\Users\username. Applications should not create files or folders at this level; they should put their data under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA. However, if you are creating a new Known Folder the profile root referred to by CSIDL_PROFILE is appropriate. 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.