From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Marcus Harnisch Newsgroups: gmane.emacs.bugs Subject: bug#40949: 26.3; substitute-env-in-file-name: Undefined variables not substituted Date: Wed, 29 Apr 2020 14:06:11 +0200 Message-ID: References: <1eb1b018-e7c6-848d-21ef-6078a3258789@gmx.net> <83k11yzg48.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="1770"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: 40949@debbugs.gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 29 14:08:37 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTlW0-0000My-VX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 14:08:36 +0200 Original-Received: from localhost ([::1]:48716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTlVz-0005LF-Oq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 08:08:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52992) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTlV0-00059J-8d for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 08:07:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTlUV-0005fK-1S for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 08:07:34 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTlUU-0005cn-KM for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 08:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jTlUU-00041Y-Cx for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 08:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marcus Harnisch Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Apr 2020 12:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40949 X-GNU-PR-Package: emacs Original-Received: via spool by 40949-submit@debbugs.gnu.org id=B40949.158816198415407 (code B ref 40949); Wed, 29 Apr 2020 12:07:02 +0000 Original-Received: (at 40949) by debbugs.gnu.org; 29 Apr 2020 12:06:24 +0000 Original-Received: from localhost ([127.0.0.1]:42617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTlTs-00040R-K0 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 08:06:24 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.73]:43831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTlTq-000409-MW for 40949@debbugs.gnu.org; Wed, 29 Apr 2020 08:06:23 -0400 Original-Received: from [192.168.158.20] ([87.123.5.146]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MUobv-1jcBXh2Dwn-00QmmB; Wed, 29 Apr 2020 14:06:12 +0200 In-Reply-To: <83k11yzg48.fsf@gnu.org> Content-Language: de-DE X-Provags-ID: V03:K1:ldlJFjeuXGG/L3tKJ9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it@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179302 Archived-At: On 29/04/2020 13.27, Eli Zaretskii wrote: > 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. The definition is special-cased for MS-Windows (passes result of getenv as opposed to a hardcoded t as optional argument to substitute-env-vars) and I am not able to check the relevant behaviour on that platform. That's why I pointed it out. > 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. It is probably moot to argue against long-standing practice, but the behaviour could perhaps benefit from a note in docstrings of functions that rely on `s-e-i-f-n'. Having used Emacsen and POSIX systems for about the same number of decades, I found this difference (Emacs vs shell) rather surprising. Thanks, Marcus