From: storm@cua.dk (Kim F. Storm)
Cc: Richard Stallman <rms@gnu.org>, eggert@twinsun.com, emacs-devel@gnu.org
Subject: Re: Reading directory names with read-file-name
Date: 29 May 2002 01:11:36 +0200 [thread overview]
Message-ID: <5xadqjq34n.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200205242159.g4OLxXS23302@rum.cs.yale.edu>
"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:
> > However, one of the candidates for an improvement could be
> > file-name-all-completions adding a third PREDICATE arg.
> > However, I think that's still not feasible for the reasons
> > I mentioned in my previous mail.
> >
> > There is no need to get that discouraged! You have pointed out a
> > complication, but a complication does not mean it is unfeasible. It
> > just means a little more work is needed.
> >
> > You can fix the file name handlers--in fact, they may not even need
> > any change. Please take a look and see if they need any change.
>
> FWIW I don't think that file-name-all-completions and file-name-completion
> need to be changed at all in order to implement the PREDICATE argument
> for read-file-name.
No, but it makes a significant difference in performance to check for
specific predicates like file-regular-p, file-writable-p etc
in file-name-all-completions where the file is already stat'ed.
As you point out it is not _necessary_, so we can do it later
if the current functionality is inadequate for a specific purpose.
BTW, for reading directory names, I've added specific code to
handle file-directory-p efficiently.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2002-05-28 23:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-18 23:33 Reading directory names with read-file-name Kim F. Storm
2002-05-18 22:47 ` Stefan Monnier
2002-05-18 23:00 ` Paul Eggert
2002-05-19 19:40 ` Richard Stallman
2002-05-19 23:20 ` Kim F. Storm
2002-05-20 0:50 ` Kim F. Storm
2002-05-20 21:33 ` Richard Stallman
2002-05-23 22:04 ` Kim F. Storm
2002-05-23 21:24 ` Stefan Monnier
2002-05-23 22:44 ` Kim F. Storm
2002-05-24 21:14 ` Richard Stallman
2002-05-24 21:59 ` Stefan Monnier
2002-05-28 23:11 ` Kim F. Storm [this message]
2002-05-24 21:14 ` Richard Stallman
2002-05-24 22:02 ` Stefan Monnier
2002-05-20 21:33 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5xadqjq34n.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--cc=eggert@twinsun.com \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.