From: "Stefan Monnier" <monnier+gnu/emacs@RUM.cs.yale.edu>
Cc: rms@gnu.org, eggert@twinsun.com, emacs-devel@gnu.org
Subject: Re: Reading directory names with read-file-name
Date: Thu, 23 May 2002 17:24:26 -0400 [thread overview]
Message-ID: <200205232124.g4NLOQ516794@rum.cs.yale.edu> (raw)
In-Reply-To: 5xsn4iv7v6.fsf@kfs2.cua.dk
> > I've looked some more on this, and the file-name-handlers (e.g. used
> > by ange-ftp) further complicates chaning the API for read-file-name,
> > read-file-name-internal, and file-name-all-completions, as well as
> > introducting a read-directory-name function.
> >
> > How so?
>
> My concern is that existing file-name-handlers for read-file-name
> are written to match the current API for that function, and
> they are expected to "mirror" the behaviour of read-file-name
> for any given set of arguments.
>
> Now, if we change the API for read-file-name, e.g. by changing
> the interpretation of the MUSTMATCH argument or adding a PREDICATE
> argument, the existing file-name-handlers may no longer work correctly.
>
> And if I add a new read-directory-name function, the existing
> file-name-handler for read-file-name will not be called when reading a
> directory name; instead a new file-name-handler will be needed for
> read-directory-name (which is simple), but the existing packages which
> install file-name-handlers for read-file-name will need to be extended
> with a file-name-handler for read-directory-name as well.
>
> So it's not trivial to change the API...
I must say that the ange-ftp code confuses me:
it creates a function ange-ftp-real-read-file-name-internal
which it doesn't use. It also announces ange-ftp-read-file-name-internal
as the handler for read-file-name-internal but never defines the
function and all this while read-file-name-internal does not check
file-name-handlers (and neither does read-file-name).
So I believe that your fear is just based on some left-over, unused
and incomplete code in ange-ftp.el but is otherwise unfounded.
Stefan
next prev parent reply other threads:[~2002-05-23 21:24 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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200205232124.g4NLOQ516794@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--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 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).