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: Tue, 11 Jul 2017 20:48:12 +0200 Message-ID: References: <83r2xoi5i5.fsf@gnu.org> <837ezfjaoy.fsf@gnu.org> <83y3rvhr65.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11482c36758d8b05540f25cf" X-Trace: blaine.gmane.org 1499799017 21980 195.159.176.226 (11 Jul 2017 18:50:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 11 Jul 2017 18:50:17 +0000 (UTC) Cc: Emacs developers , Noam Postavsky To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 11 20:50:13 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 1dV0Ea-0005Gh-LR for ged-emacs-devel@m.gmane.org; Tue, 11 Jul 2017 20:50:08 +0200 Original-Received: from localhost ([::1]:48436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dV0Eg-000230-1V for ged-emacs-devel@m.gmane.org; Tue, 11 Jul 2017 14:50:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dV0E7-00022T-7B for emacs-devel@gnu.org; Tue, 11 Jul 2017 14:49:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dV0E6-0007Mx-66 for emacs-devel@gnu.org; Tue, 11 Jul 2017 14:49:39 -0400 Original-Received: from mail-qk0-f180.google.com ([209.85.220.180]:35288) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dV0E2-0007LE-BE; Tue, 11 Jul 2017 14:49:34 -0400 Original-Received: by mail-qk0-f180.google.com with SMTP id 16so782359qkg.2; Tue, 11 Jul 2017 11:49:34 -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=aGz5yIJTRELuYtXrbS2F/YR4vbKkVy5J0/s9908+ahA=; b=FQuCM8f0Y4/HsEz8UdA3hHUSEn4ymEmMvU78d1c+TmvhP85HXl2ORNWgnujDW2Zsn1 6dJvf2wZ+/ghXyUQQnsW1gRgjeaGLgGu70e+enwgf8jILPxdshz7aCbUfdaR0fms4Ft7 g/gZa1hTc7CSrC6W4bwcAZ8YgpJYKK6lXaekIKeLSdhhTYRPOp60p610pYreZuOYOJsx qAb8cZzo78TdaFWQCMPZ/XnkmaxG/9a/7D45vuxBdb0G7IE2O4d4npXIeAIX07yUMQL1 9T+aDC4+Hk0V+Xa7BolBVp7ww5HVF/IsjZaAODBAn884br6ka1Sa4vJSHy8sM+jorq8Y F0mg== 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=aGz5yIJTRELuYtXrbS2F/YR4vbKkVy5J0/s9908+ahA=; b=H+PuB9+jj1meKeCrzy4LGIaHkLt0gPM/38A5qDmZ+TU4HFITaNU0yglFVtNzkKrkIT RiIdvHpeQmtFCTQqS9p88kYnHqx3GR/PyktHr8BBIQUraTB93ogs21tvVcZC1LwR4UTG asSqMjPqaHgO/ZYfroQWlg/ozt0fRxPWxVBDfIQLSPu+VnDLWYAlH1+g3I4hQE4zG9Yt frnl2agCJNnvNibon32xZX6hr90o0390TqqVBS6PzNm3WeDJoqgqrLFUKOi+ZFWvR7Mm GpjqmaKKn4Uj18nYAMV/N2p6IMo+c35+VZRRd3p3CuihUKWbGf0z4/Ymy93Lx/bHoH4P PvXQ== X-Gm-Message-State: AIVw113OWKuIojWcbZerSCPbyoKC0v59c4qbSUGoATMY3uu1HWP3lWNF nFbiFhoNn/KOMISCJ891b8LJPTZlZNca X-Received: by 10.55.99.85 with SMTP id x82mr1777288qkb.62.1499798913254; Tue, 11 Jul 2017 11:48:33 -0700 (PDT) Original-Received: by 10.140.82.21 with HTTP; Tue, 11 Jul 2017 11:48:12 -0700 (PDT) In-Reply-To: <83y3rvhr65.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.180 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:216501 Archived-At: --001a11482c36758d8b05540f25cf Content-Type: text/plain; charset="UTF-8" 2017-07-11 18:30 GMT+02:00 Eli Zaretskii : > > From: Fabrice Popineau > > Date: Tue, 11 Jul 2017 18:24:15 +0200 > > Cc: Noam Postavsky , Emacs developers < > emacs-devel@gnu.org> > > > > If so, does it mean that after > > invoking 'setenv', your process-environment has 2 members which both > > start with "TEMP=", but have different values? Because _this_ is what > > I cannot reproduce and frankly don't understand how could it happen. > > > > And now I understand the reason why you don't see the problem. > > I compile emacs from a mingw64 prompt. I have started emacs from the > msys2 bash. > > This is what messes up the environment. > > Can you tell the details of how it "messes up" the environment? > Bash implements a case sensitive environment : Fabrice@LOBSANG $ export FOO=BAR Fabrice@LOBSANG $ export foo=baz Fabrice@LOBSANG $ echo $FOO BAR Fabrice@LOBSANG $ echo $foo baz Emacs is built as a mingw64 app, not an msys app. So it should behave as any native Windows app, wether you run it from bash or not. At least, that is what I would expect. So in this case, the environment variables should be considered case insensitive. But emacs will inherit the env vars from bash, and arguably, they are case sensitive. Another option is to make emacs inherit the variables from the desktop, not from the shell (or cmd) it is started from. That would make sense at least for a GUI emacs. But that is less flexible. Fabrice --001a11482c36758d8b05540f25cf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-07-11 18:30 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:
=
> From: Fabrice Popine= au <fabrice.popineau@gmail= .com>
> Date: Tue, 11 Jul 2017 18:24:15 +0200
> Cc: Noam Postavsky <npostavs@users.sourceforge.net>, Emac= s developers <emacs-devel@gnu.org= >
>
>=C2=A0 If so, does it mean that after
>=C2=A0 invoking 'setenv', your process-environment has 2 member= s which both
>=C2=A0 start with "TEMP=3D", but have different values? Becau= se _this_ is what
>=C2=A0 I cannot reproduce and frankly don't understand how could it= happen.
>
> And now I understand the reason why you don't see the problem.
> I compile emacs from a mingw64 prompt. I have started emacs from the m= sys2 bash.
> This is what messes up the environment.

Can you tell the details of how it "messes up" the environ= ment?

Bash implements a case sensitive = environment :

Fabrice@LOBSANG=C2=A0
$ ex= port FOO=3DBAR

Fabrice@LOBSANG=C2=A0
$ e= xport foo=3Dbaz

Fabrice@LOBSANG=C2=A0
$ = echo $FOO
BAR

Fabrice@LOBSANG=C2=A0
$ echo $foo
baz

Emacs is built as = a mingw64 app, not an msys app.=C2=A0
So it should behave as any = native Windows app, wether you run it from bash or not.
At least,= that is what I would expect.
So in this case, the environment va= riables should be considered case insensitive.
But emacs will inh= erit the env vars from bash, and arguably, they are case sensitive.

Another option is to make emacs inherit the variables fro= m the desktop, not from the shell (or cmd) it is started from.
Th= at would make sense at least for a GUI emacs. But that is less flexible.

Fabrice
=C2=A0
--001a11482c36758d8b05540f25cf--