[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: substitute-in-file-name and "$"
From: |
Stefan Monnier |
Subject: |
Re: substitute-in-file-name and "$" |
Date: |
Sun, 06 Jul 2003 13:20:11 -0400 |
> > > At least the examples in the Elisp manual give the feeling that
> > > substitute-in-file-name could be called without special attention. The
> > > trap with the "$" char isn't obvious.
> >
> > Consider that the environment-variable's _value_ could contain a `$', so it
> > seems actually fairly obvious that you should only call
> > substitute-in-file-name once...
>
> Maybe substitute-in-file-name could put a `substitute-in-file-name'
> property on the return value and check for that property on its
> argument (and do nothing if it is present).
This definitely qualifies as over-engineering.
substitute-in-file-name should be used very rarely anyway (in terms of
number of times it shows up in source code), so it's not a big deal.
Most uses of substitute-in-file-name are hidden inside read-file-name.
I'm curious to know which other cases exist.
substitute-in-file-name is basically the function that turns "user-typed"
file names into their "internal" representation, so obviously it should
be applied exactly once. As for having a filename that's made up of a
user-typed part and an internal part, that's also most likely a bug: the
user-typed part should be passed through substitute-in-file-name before
being combined with the internal part (hopefully with expand-file-name).
Stefan
- Re: substitute-in-file-name and "$", (continued)
- Re: substitute-in-file-name and "$", Michael Albinus, 2003/07/06
- Re: substitute-in-file-name and "$", Luc Teirlinck, 2003/07/06
- Re: substitute-in-file-name and "$", Kai Großjohann, 2003/07/06
- Re: substitute-in-file-name and "$", Michael Albinus, 2003/07/07
- Re: substitute-in-file-name and "$", Miles Bader, 2003/07/05
- Re: substitute-in-file-name and "$", Kim F. Storm, 2003/07/06
- Re: substitute-in-file-name and "$", Michael Albinus, 2003/07/06
- Re: substitute-in-file-name and "$", Stefan Monnier, 2003/07/06
- Re: substitute-in-file-name and "$",
Stefan Monnier <=
- Re: substitute-in-file-name and "$", Michael Albinus, 2003/07/07
- Re: substitute-in-file-name and "$", Stefan Monnier, 2003/07/07
- Re: substitute-in-file-name and "$", Michael Albinus, 2003/07/07
- Re: substitute-in-file-name and "$", Richard Stallman, 2003/07/09
- Re: substitute-in-file-name and "$", Richard Stallman, 2003/07/06
- Re: substitute-in-file-name and "$", Kevin Rodgers, 2003/07/07
- Re: substitute-in-file-name and "$", Richard Stallman, 2003/07/08
Re: substitute-in-file-name and "$", Richard Stallman, 2003/07/06