GNU bug report logs - #5808
23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH}

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Wed, 31 Mar 2010 00:19:01 UTC

Severity: minor

Found in versions 23.4, 24.3

Fixed in version 24.5

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: 5808 <at> debbugs.gnu.org
Subject: bug#5808: 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH}
Date: Tue, 30 Mar 2010 21:29:53 -0400
> Evaluating
>     (substitute-in-file-name "$NOSUCHVAR")
>     => "$NOSUCHVAR
> but
>     (substitute-in-file-name "${NOSUCHVAR}")
>     => error
>     Substituting nonexistent environment variable "NOSUCHVAR"
[...]
> I'm not sure if this is a bug or a feature.  I see they were both errors
> in Emacs 21, but that 22 up forgives the first.

I made the change in Emacs-22 so that most uses of $ in file names can
work without needing the quoting by double-dollars.

It was a fairly easy change which should cover most cases.  Admittedly,
the resulting inconsistency is not great, so I guess that the
discrepancy is a misfeature/bug, but it's not very high up the list of
things to fix.  Patches welcome,


        Stefan




This bug report was last modified 9 years and 19 days ago.

Previous Next


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