From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs 25.2, win64, env vars Date: Tue, 25 Jul 2017 17:16:52 +0300 Message-ID: <83d18o7ga3.fsf@gnu.org> References: <83r2xoi5i5.fsf@gnu.org> <837ezfjaoy.fsf@gnu.org> <83inil9cg2.fsf@gnu.org> <83eft78b05.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1500992283 7902 195.159.176.226 (25 Jul 2017 14:18:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Jul 2017 14:18:03 +0000 (UTC) Cc: emacs-devel@gnu.org, npostavs@users.sourceforge.net To: Fabrice Popineau Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 25 16:17:55 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da0eo-0001Y9-7D for ged-emacs-devel@m.gmane.org; Tue, 25 Jul 2017 16:17:54 +0200 Original-Received: from localhost ([::1]:32815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da0es-0006mB-8y for ged-emacs-devel@m.gmane.org; Tue, 25 Jul 2017 10:17:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da0dr-0006kp-OP for emacs-devel@gnu.org; Tue, 25 Jul 2017 10:16:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da0do-0005EU-JN for emacs-devel@gnu.org; Tue, 25 Jul 2017 10:16:55 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da0do-0005EO-Fd; Tue, 25 Jul 2017 10:16:52 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4332 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1da0dn-0001ml-UD; Tue, 25 Jul 2017 10:16:52 -0400 In-reply-to: (message from Fabrice Popineau on Mon, 24 Jul 2017 22:34:20 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217022 Archived-At: > From: Fabrice Popineau > Date: Mon, 24 Jul 2017 22:34:20 +0200 > Cc: Noam Postavsky , Emacs developers > > So you are saying that MSYS holds two separate environment variables, > one called "temp", the other "TEMP"? If so, what do native Windows > programs started from such a shell get in their environment? The > upper-case one? the first one in the order? both? something else? > > Both GetEnvironmentVariable) and getenv() return : > > TEMP=C:\MSys64\tmpy > temp=C:\MSys64\tmp > > And from the shell : > > $ echo $TEMP > /tmp > > $ echo $temp > C:\Users\Fabrice\AppData\Roaming\Local\Temp > > So they return the win32 path from the value of the upper case variable. Maybe we could remove the lower-case variant at startup, so that it won't get in the way of programs Emacs invokes? Or could that break some use cases for people who also set their shell in Emacs to the MSYS shell? > My opinion (but I may well be alone) is that Emacs/win32 fiddles too much with those unix-like environments. > This works most of the time, but it also sometimes creates surprising situations. Environment variables are not limited to Unix, so I'm not sure why you think it's Unix-like.