emacs-devel
[Top][All Lists]
Advanced

[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 17:55:54 -0400

> Richard Stallman <address@hidden> writes:
> 
> >     What I'ld like to know: Is it a general rule, that
> >     substitute-in-file-name can be called only once for a given file name?
> > 
> > Yes, I think that is the idea.  I will document that.
> > 
> >     Then it should be documented in the Elisp manual, and it is a bug in
> >     PC-do-completion. Or is it a more general design problem?
> > 
> > I think this is a bug in PC-do-completion.  Would someone like
> > to fix it?
> 
> I think ido could have similar problems related to completion (it must
> expand things like $DIR to be able to present the user with the possible
> completions in that directory).  How do you suggest it is fixed?
> 
> I see only one possibility -- perform the substitution to make the
> completion list, but don't substitute it in the actual file-name read
> (as it does now).
> 
> Is that the correct approach?

The way read-file-name-internal does it, the filename is passed to
substitute-in-file-name (to get a filename that you can pass to file
operations) and before returning the result all $ are doubled (using
double_dollars in src/fileio.c).

But for ido you probably want to do it differently because you can't
wait for an explicit TAB or SPC from the user.
Problem is that it can be difficult to relate the output of
substitute-in-file-name to its input.


        Stefan





reply via email to

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