emacs-devel
[Top][All Lists]
Advanced

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

RE: file-truename, convert-standard-filename


From: Drew Adams
Subject: RE: file-truename, convert-standard-filename
Date: Fri, 26 Feb 2010 11:12:05 -0800

> > OK. Then add "and you do not know whether the file named 
> > exists" to what I wrote. Again, that is the general case.
> 
> I think too much attention is being paid to the question of 
> whether files exist, which adds noise because so often we
> don't know (in advance) whether a particular file exists.
> 
> The simple explanation is this
> ...
> 
> When the user asks to visit a file, or we get a filename from `ls' or
> whatever other system source, the distinction between these 
> two sets is unimportant, because system tools will only
> generate filenames in the valid set, and reporting to the user
> that their filename is invalid is sufficient (as they can then
> choose another).

This is where I either still do not understand (probably) or do not completely
agree. Platform-knowledgeable tools generating file names is one thing; a user
entering a file name is another.

If a user provides a file name, what's to ensure that the name is valid for the
given platform? Much (most?) file-name input by users is lax, not requiring a
match against an existing file. A user could include `?' for Windows, for
instance.

This might be where a connection with a test for an existing file would come in?
(Dunno.)

If my code gets a file name from the user, and I can't depend on it being valid
for the given platform, why would I *not* need to call `convert...'? Just
wondering. Seems to me this would be similar to the
literal-file-name-string-in-code situation.

Anyway, thanks for the extended explanation. It was what I eventually had
understood from the thread, but it helps in any case. If it had come earlier in
the thread, it might have made the thread shorter. ;-)





reply via email to

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