GNU bug report logs - #40949
26.3; substitute-env-in-file-name: Undefined variables not substituted

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Marcus Harnisch <marcus.harnisch@HIDDEN>; dated Tue, 28 Apr 2020 21:01:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 40949 <at> debbugs.gnu.org:


Received: (at 40949) by debbugs.gnu.org; 29 Apr 2020 11:28:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 07:28:02 2020
Received: from localhost ([127.0.0.1]:42587 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTksj-000116-UX
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 07:28:02 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45230)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jTksi-00010p-6F
 for 40949 <at> debbugs.gnu.org; Wed, 29 Apr 2020 07:28:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52880)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jTksc-0002V4-DN; Wed, 29 Apr 2020 07:27:54 -0400
Received: from [176.228.60.248] (port=4115 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jTksb-0002Qb-PY; Wed, 29 Apr 2020 07:27:54 -0400
Date: Wed, 29 Apr 2020 14:27:35 +0300
Message-Id: <83k11yzg48.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Marcus Harnisch <marcus.harnisch@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <1eb1b018-e7c6-848d-21ef-6078a3258789@HIDDEN> (message from
 Marcus Harnisch on Tue, 28 Apr 2020 22:38:14 +0200)
Subject: Re: bug#40949: 26.3;
 substitute-env-in-file-name: Undefined variables not substituted
References: <1eb1b018-e7c6-848d-21ef-6078a3258789@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40949
Cc: 40949 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Marcus Harnisch <marcus.harnisch@HIDDEN>
> Date: Tue, 28 Apr 2020 22:38:14 +0200
> 
> With commit ee041f2d07b6ed485dc34c115588f973f046c9d4 the function
> `substitute-env-in-file-name' was introduced.
> 
> The function substitutes environment variable references in filenames
> with the help of `substitute-env-vars'. On systems that are neither
> windows-nt nor ms-dos, the optional argument to that function is set to
> t with the consequence that references to undefined variables are not
> substituted. This is unexpected, IMHO.
> Expected behaviour would match that of shell expansion, which
> substitutes undefined variables with the empty string.

Your report seems to imply that the behavior on MS-Windows is
different, but it isn't: if the variable is undefined, we leave it
unaltered on those systems as well.

Whether Emacs should follow what the shell does is a separate issue.
In this case, since we use this function in substitute-in-file-name,
what it does should serve what substitute-in-file-name was always
doing: it left the $foo constructs unaltered.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40949; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Apr 2020 21:00:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 17:00:42 2020
Received: from localhost ([127.0.0.1]:41761 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTXLO-0004Kt-Ld
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 17:00:42 -0400
Received: from lists.gnu.org ([209.51.188.17]:43342)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <marcus.harnisch@HIDDEN>) id 1jTX4y-0003k7-QY
 for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 16:43:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41744)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <marcus.harnisch@HIDDEN>) id 1jTX1I-0000lz-Qt
 for bug-gnu-emacs@HIDDEN; Tue, 28 Apr 2020 16:43:44 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=unavailable autolearn_force=no
 version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <marcus.harnisch@HIDDEN>) id 1jTWzh-0005dT-Qh
 for bug-gnu-emacs@HIDDEN; Tue, 28 Apr 2020 16:39:56 -0400
Received: from mout.kundenserver.de ([212.227.126.134]:59669)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <marcus.harnisch@HIDDEN>)
 id 1jTWzh-0005Qt-74
 for bug-gnu-emacs@HIDDEN; Tue, 28 Apr 2020 16:38:17 -0400
Received: from [192.168.158.20] ([87.122.82.146]) by mrelayeu.kundenserver.de
 (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id
 1MfYgC-1iwO6A3Wg4-00fxpj for <bug-gnu-emacs@HIDDEN>; Tue, 28 Apr 2020
 22:38:14 +0200
To: bug-gnu-emacs@HIDDEN
Subject: 26.3; substitute-env-in-file-name: Undefined variables not substituted
From: Marcus Harnisch <marcus.harnisch@HIDDEN>
Message-ID: <1eb1b018-e7c6-848d-21ef-6078a3258789@HIDDEN>
Date: Tue, 28 Apr 2020 22:38:14 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: de-DE
X-Provags-ID: V03:K1:ILYB5HxvzWCoNklYPY50b3KI1v75ISy5kvpIA2T87tDL/SutBpY
 LEVV2vliIK4OmJmdCYg8jg6/Gppg1N8F4P2SQJBFBeVsPxKe6Jlc6lGS/NnZkQUSUiJXE+s
 dGKqueqC925gJLLwnK8yWxIZLxwQAJM+rmb5hj3Zokrtj4NUpzjykri50mywG8ZvDRO3NeZ
 /c8GzHgvy0/jXmgL7U8+Q==
X-UI-Out-Filterresults: notjunk:1;V03:K0:CW26oT73Dxk=:2gefgE05PYazOD8fTEm4/1
 qiUuYRHOUl3ryWxPQLLmSApErSJDR3YCbQDJvR8Nh1LfYUVbqYmUTGTkM0peNpkWTLINUcMZp
 r2rG1FGPKJBZbWqaSUXSKg2j/qdx7zOQMlsaEeFFZLJ2E80v9jPYXemjfvgPIM2ZyWqtzefdS
 vHW/p6CPWs/9L3CkNRjfQdPYmvbGxD7y9iONs3Bbdl9vn7KJ2APo1BEAASZCn5ahFpdT/WXiB
 Iw1nF5KozmwFSUqmN2P/bK/JQssRQtnej9GVvCa6bZxi46wHaI0y/pmk3ZWIqHyPu+jog2SpY
 RWz5vrK/rM0SSwpiPoz4o2HaY1Jb7gxLyjRGwkNR6y2wxhrEc6HZqXuUjXgvFUV8SKfK2fLYR
 5GGVcgHJ+6S4PJTTr0E90g9TJ5jR6RKGIQw4zjeNzhj/uhmrLFLkYYYYWd8pk3gL/DQP2Mr5t
 huRF+Aabj1jeaM4+grQWACe44C/6Low5uH6UYucIo4WWFTA7/28etGAMvzO5gwgWGwO1A9cGj
 EcHFb8a+Koyv8USEXyS/hhPthzKo9S0lM1UWX5R2XwxbUEdNiTN6k1o7iifTIMXhvYu/5tr5a
 hp3wFcl2MBTNpvY82op2dCw3G6qXqVqjnQYxY0xu2X0QLEpn7S3lIr0bj1Bd20ZCSFBZzfiB9
 XQ5mpnzWe/l8VkpQOEh1sC2GWvrVsMy8Q9gwZ6cueH6FRD28N0RS0uIXUR5agGxIWSrZFzQNE
 bBftT6+aSXDUQVXBgEg0KKsH0s2xbOqh6W1tWkOcz/Sx/wXBCoRQlV+i18DctOyilWw04i9BG
 rGkFupX2TgTkRrrKe2g3g55eMNkL+JTKYJv202BBYrt1Q22pEzkw+F4ejz3tnySmXM5uepQ
Received-SPF: pass client-ip=212.227.126.134;
 envelope-from=marcus.harnisch@HIDDEN; helo=mout.kundenserver.de
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/28 16:38:15
X-ACL-Warn: Detected OS   = Linux 3.11 and newer
X-Received-From: 212.227.126.134
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 28 Apr 2020 17:00:41 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

With commit ee041f2d07b6ed485dc34c115588f973f046c9d4 the function
`substitute-env-in-file-name' was introduced.

The function substitutes environment variable references in filenames
with the help of `substitute-env-vars'. On systems that are neither
windows-nt nor ms-dos, the optional argument to that function is set to
t with the consequence that references to undefined variables are not
substituted. This is unexpected, IMHO.
Expected behaviour would match that of shell expansion, which
substitutes undefined variables with the empty string.

Cheers,
Marcus





Acknowledgement sent to Marcus Harnisch <marcus.harnisch@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#40949; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 29 Apr 2020 11:30:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.