emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

insert-default-directory


From: Luc Teirlinck
Subject: insert-default-directory
Date: Sun, 25 Jan 2004 22:13:04 -0600 (CST)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]