unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8480: 24.0.50; (elisp) Reading File Names
@ 2011-04-11 22:42 Drew Adams
  2011-05-28 19:58 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2011-04-11 22:42 UTC (permalink / raw)
  To: 8480

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'
 






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#8480: 24.0.50; (elisp) Reading File Names
  2011-04-11 22:42 bug#8480: 24.0.50; (elisp) Reading File Names Drew Adams
@ 2011-05-28 19:58 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2011-05-28 19:58 UTC (permalink / raw)
  To: Drew Adams; +Cc: 8480

"Drew Adams" <drew.adams@oracle.com> writes:

> 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.

OK, clarified.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-28 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11 22:42 bug#8480: 24.0.50; (elisp) Reading File Names Drew Adams
2011-05-28 19:58 ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).