From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: Emacs 25.2, win64, env vars Date: Mon, 24 Jul 2017 22:34:20 +0200 Message-ID: References: <83r2xoi5i5.fsf@gnu.org> <837ezfjaoy.fsf@gnu.org> <83inil9cg2.fsf@gnu.org> <83eft78b05.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c06f45cef1c1e055516247f" X-Trace: blaine.gmane.org 1500929150 13576 195.159.176.226 (24 Jul 2017 20:45:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Jul 2017 20:45:50 +0000 (UTC) Cc: Emacs developers , Noam Postavsky To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 24 22:45:44 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 1dZkEa-00036Y-0V for ged-emacs-devel@m.gmane.org; Mon, 24 Jul 2017 22:45:44 +0200 Original-Received: from localhost ([::1]:56900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZkEe-0000nD-17 for ged-emacs-devel@m.gmane.org; Mon, 24 Jul 2017 16:45:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZk3y-0008TD-1e for emacs-devel@gnu.org; Mon, 24 Jul 2017 16:34:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZk3w-0002hm-SW for emacs-devel@gnu.org; Mon, 24 Jul 2017 16:34:46 -0400 Original-Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:34674) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dZk3v-0002e6-4v; Mon, 24 Jul 2017 16:34:43 -0400 Original-Received: by mail-qk0-x233.google.com with SMTP id t2so62394439qkc.1; Mon, 24 Jul 2017 13:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=judGdhdqR1xe2R/32hA36AkJ+8THB8OW1Au/kyaU4eM=; b=Ec0mjv+2odiEwyeOWG8+69YN71h3c67shqWi/RPXElO7Tb0G6qJbNvgBuCn/OgTfLM 1VPfPd2zyqbTS2ARVnIZVsjkEcpbgjrp0Sug6KlhmY2cMmfk1g0xwqxq8mQULjbpGQSQ jptoylDpzdVwWeemz2qsSDthIVavHYQ6k0290ikGdIL0kHzhELzk2ygQrTT1p1IYYjwP NXO37OAa1fFzo/zeyEXUnvTVDAn7akHcxUJeXKO0eUPTXPWgXb//3xJMyxF+LXcVJNeF mGjVTPNHtIqMRASr9kMwvUltOeHkbLAmlG5nskXiCTT3OS48ePuuethGvgmxTd8PEBUk Aw1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=judGdhdqR1xe2R/32hA36AkJ+8THB8OW1Au/kyaU4eM=; b=NMFvsxeJwxREH0gf/JxXvPCuk3KAYGqj51GqpXc8FxLOPZrAMV6p+zx6+SEJojAMnr /JGXE42UzUI82Yjms8CUrFe2C49OzrnOCv9B7xd22fFZrm1Te5qyLIlK1x//cIULksls ImvApjsZGoeTKaR1lAlDQY+4CFQ/A8yrkIj1ZHrcxm/IBNkaRbvqBwdtjbrmsjH/NzmC 0HgZ4yQWTwTS+d9/3f7mROMDmMGbOnVDr2hZHl5uKoSBFJgm2Kvj/Wro3Jk3kfa3Nm9H n318AAee6grXpY/xQhhUDBD+mbo97VQQ+OwSDdy5BCBJ3Jmx2CXZw2N1t+RpCGra1Wlt 46BA== X-Gm-Message-State: AIVw111OHvIWYWgHec6GlbU10V6puKqOLYTAS53yJAjGmHMkYVjl9W81 TQAAiN9tnFnLUJOJdt3PXpCQI8QsSbVZ X-Received: by 10.55.169.134 with SMTP id s128mr21361360qke.69.1500928480843; Mon, 24 Jul 2017 13:34:40 -0700 (PDT) Original-Received: by 10.140.82.21 with HTTP; Mon, 24 Jul 2017 13:34:20 -0700 (PDT) In-Reply-To: <83eft78b05.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::233 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:217000 Archived-At: --94eb2c06f45cef1c1e055516247f Content-Type: text/plain; charset="UTF-8" 2017-07-23 16:48 GMT+02:00 Eli Zaretskii : > > From: Fabrice Popineau > > Date: Sat, 22 Jul 2017 22:02:03 +0200 > > Cc: Noam Postavsky , Emacs developers < > emacs-devel@gnu.org> > > > > Ping! If we want to fix this problem, please tell the details about > > how the MSYS2 Bash causes it. If not, let's decide that we don't > > want to fix it. > > > > I thought my previous answer was pretty explicit. > > Sorry, it's probably my misunderstanding. > > > MSYS2 bash implements a case sensitive environment, which is different > from the native win32 environment. > > If emacs is started from the bash command line, it inherits this > environment. > > 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. > > > I would even recommend that emacs inherits from the desktop environment, > not the environment from the > > shell that was used to run emacs. > > I expect this to break quite a few legitimate use cases. > Maybe (albeit I couldn't name them). 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. Fabrice --94eb2c06f45cef1c1e055516247f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-07-23 16:48 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:
=
> From: Fabrice Popine= au <fabrice.popineau@gmail= .com>
> Date: Sat, 22 Jul 2017 22:02:03 +0200
> Cc: Noam Postavsky <npostavs@users.sourceforge.net>, Emac= s developers <emacs-devel@gnu.org= >
>
>=C2=A0 Ping! If we want to fix this probl= em, please tell the details about
>=C2=A0 how the MSYS2 Bash causes it. If not, let's decide that we d= on't
>=C2=A0 want to fix it.
>
> I thought my previous answer was pretty explicit.

Sorry, it's probably my misunderstanding.

> MSYS2 bash implements a case sensitive environment, which is different= from the native win32 environment.
> If emacs is started from the bash command line, it inherits this envir= onment.

So you are saying that MSYS holds two separate environment variables= ,
one called "temp", the other "TEMP"?=C2=A0 If so, what = do native Windows
programs started from such a shell get in their environment?=C2=A0 The
upper-case one? the first one in the order? both? something else?

=C2=A0Both GetEnvironmentVariable) and getenv() = return :

TEMP=3DC:\MSys64\tmpy
temp= =3DC:\MSys64\tmp

And from the shell :
$ echo $TEMP
/tmp

$ echo $t= emp
C:\Users\Fabrice\AppData\Roaming\Local\Temp
So they return the win32 path from the value of the upper= case variable.
=C2=A0

> I would even recommend that emacs inherits from the desktop environmen= t, not the environment from the
> shell that was used to run emacs.

I expect this to break quite a few legitimate use cases.

Maybe (albeit I couldn't name them).

My opinion (but I may well be alone) =C2=A0is that Emacs/wi= n32 fiddles too much with those unix-like environments.
This work= s most of the time, but it also sometimes creates surprising situations.


Fabrice

--94eb2c06f45cef1c1e055516247f--