From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Reading directory names with read-file-name Date: Thu, 23 May 2002 17:24:26 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200205232124.g4NLOQ516794@rum.cs.yale.edu> References: <5xy9eh820e.fsf@kfs2.cua.dk> <200205182300.g4IN0Cm00753@shade.twinsun.com> <200205191940.g4JJeRw24012@aztec.santafe.edu> <5xu1p3zput.fsf@kfs2.cua.dk> <5xd6vrzlpp.fsf@kfs2.cua.dk> <200205202133.g4KLXgB25956@aztec.santafe.edu> <5xsn4iv7v6.fsf@kfs2.cua.dk> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1022189219 10844 127.0.0.1 (23 May 2002 21:26:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 23 May 2002 21:26:59 +0000 (UTC) Cc: rms@gnu.org, eggert@twinsun.com, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17B06t-0002on-00 for ; Thu, 23 May 2002 23:26:59 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17B0MS-00062N-00 for ; Thu, 23 May 2002 23:43:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17B07H-00013v-00; Thu, 23 May 2002 17:27:23 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17B04T-0000o4-00; Thu, 23 May 2002 17:24:29 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g4NLOQ516794; Thu, 23 May 2002 17:24:26 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: storm@cua.dk (Kim F. Storm) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4309 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4309 > > 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