From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: insert-default-directory Date: Sun, 25 Jan 2004 22:13:04 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200401260413.i0Q4D4W13015@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1075090845 12107 80.91.224.253 (26 Jan 2004 04:20:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2004 04:20:45 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jan 26 05:20:34 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AkyEk-0001dZ-00 for ; Mon, 26 Jan 2004 05:20:34 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AkyEj-0002fd-00 for ; Mon, 26 Jan 2004 05:20:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aky95-0007Yb-7w for emacs-devel@quimby.gnus.org; Sun, 25 Jan 2004 23:14:43 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Aky8s-0007Wg-1l for emacs-devel@gnu.org; Sun, 25 Jan 2004 23:14:30 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aky8K-0007Jz-DZ for emacs-devel@gnu.org; Sun, 25 Jan 2004 23:14:28 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aky8J-0007JO-Ni for emacs-devel@gnu.org; Sun, 25 Jan 2004 23:13:55 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i0Q4EdKk005348 for ; Sun, 25 Jan 2004 22:14:39 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i0Q4D4W13015; Sun, 25 Jan 2004 22:13:04 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19480 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19480 I might be missing some obvious things, but I have the impression that a nil value for the user option `insert-default-directory' is not very well supported. The user can make `read-file-name' return an empty string by erasing all inserted minibuffer contents. But if `insert-default-directory' is nil and the INITIAL argument to `read-file-name' is nil (as recommended) then there is no string to erase and just typing RETURN with an empty minibuffer selects some default value instead of "". This matters for certain commands. For instance, I might be missing something, but I know of no convenient and intuitive way to make the current buffer visit no file using M-x set-visited-file-name if `insert-default-directory' is nil. Other problem: Start emacs -q I then do: (setq `insert-default-directory' nil) (read-directory-name "Name: " "~/emacscvsdir/" nil t) "emacscvsdir" is where I keep the Emacs CVS. That directory contains a directory named "manual". I want to select that directory. I type "manual" in the minibuffer. RETURN. It gets completed to "manual/". Fine, I do not mind about the "/". RETURN. Instead of accepting "manual/", `read-directory-name' now insists on trying to complete to a subdirectory of the "manual" directory. The same problem occurs when using `read-file-name' for directories. With `insert-default-directory' set to t, `read-directory-name' happily accepts "manual/" without trying completion. It even accepts "manual" too. Sincerely, Luc.