Subject: bug#8480: 24.0.50; (elisp) Reading File Names

From: "Drew Adams" <[email-masked]>
Date: Mon, 11 Apr 2011 15:42:56 -0700

Doc for `read-file-name': Just after describing the PREDICATE arg, we
say that `read-file-name' does not automatically expand file names etc.
 
Then we say "Here is an example:" and give an overall example of using
`read-file-name'.  This is not an example to show that `r-f-n' does not
automatically expand file names.  In fact, this example might be misread
as trying to show the opposite, since the result returned is an absolute
file name.
 
If the example here, as I suppose, is supposed to be general, then it
should be introduced as such, to avoid giving the impression that it is
meant to illustrate something about non-expansion of candidate names
(the topic just discussed).
 
A better example perhaps would show what happens when `insert-directory'
is nil or someone has deleted the directory portion.  Such an example
would also show that there is no automatic expansion of the result.
 
Finally, I think it should be pointed out that it is not only the result
returned by the function that does not get expanded.  If a user passes a
PREDICATE arg, s?he needs to know that the file name operated on by the
predicate has no directory component; i.e., no expansion is done here
either.
 
What's more, `default-directory' is not sufficient, in general, for the
proper relevant expansion.  Typically, to get the right directory for
expansion before testing by PREDICATE (if the directory is important for
the test), one needs to get it from the minibuffer (if it is there) or
somehow know it otherwise.

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-04-11 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'