From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Reading directory names with read-file-name Date: 19 May 2002 01:33:37 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xy9eh820e.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 1021761177 12567 127.0.0.1 (18 May 2002 22:32:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 18 May 2002 22:32:57 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 179Ckz-0003Ga-00 for ; Sun, 19 May 2002 00:32:57 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179Cy9-0004Le-00 for ; Sun, 19 May 2002 00:46:33 +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 179ClG-0003OB-00; Sat, 18 May 2002 18:33:14 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 179Ckw-0003NX-00 for ; Sat, 18 May 2002 18:32:54 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 7368B7C016 for ; Sat, 18 May 2002 22:32:53 +0000 (GMT) Original-To: emacs-devel@gnu.org Original-Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 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:4102 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4102 When a directory name is read with read-file-name, there really isn't anything which indicates that it is a directory name rather than a file name that is required. Among other things, this implies that using completion while reading a directory name returns all file _and_ directory names, rather than just the directory names. To me, this really doesn't make sense. I propose to add a sixth argument READ-DIR to read-file-name which indicates that we are reading a directory name, and not just any file name. The completion in read-file-name-internal should (somehow) be aware of this and only return completions which are directories (i.e. having a trailing /). Subsequently, I propose to implement a wrapper in lisp around read-file-name named read-directory-name. If we agree on this, I'll implement it. -- Kim F. Storm http://www.cua.dk