bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40949: 26.3; substitute-env-in-file-name: Undefined variables not su


From: Eli Zaretskii
Subject: bug#40949: 26.3; substitute-env-in-file-name: Undefined variables not substituted
Date: Wed, 29 Apr 2020 14:27:35 +0300

> From: Marcus Harnisch <marcus.harnisch@gmx.net>
> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]