unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Marcus Harnisch <marcus.harnisch@gmx.net>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 40949@debbugs.gnu.org
Subject: bug#40949: 26.3; substitute-env-in-file-name: Undefined variables not substituted
Date: Wed, 29 Apr 2020 14:27:35 +0300	[thread overview]
Message-ID: <83k11yzg48.fsf@gnu.org> (raw)
In-Reply-To: <1eb1b018-e7c6-848d-21ef-6078a3258789@gmx.net> (message from Marcus Harnisch on Tue, 28 Apr 2020 22:38:14 +0200)

> 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	other threads:[~2020-04-29 11:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 20:38 bug#40949: 26.3; substitute-env-in-file-name: Undefined variables not substituted Marcus Harnisch
2020-04-29 11:27 ` Eli Zaretskii [this message]
2020-04-29 12:06   ` Marcus Harnisch
2021-06-13 12:15     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83k11yzg48.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=40949@debbugs.gnu.org \
    --cc=marcus.harnisch@gmx.net \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).