[Top][All Lists]

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

Re: completing-read in E21

From: Kim F. Storm
Subject: Re: completing-read in E21
Date: 05 Dec 2001 12:45:17 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Richard Stallman <address@hidden> writes:

>     Can anyone tell me why this nice feature of completing-read is
>     considered deprecated and what to use instead to get the same 
> functionality?
> It is annoying to put initial input in the minibuffer.  Now that we
> have the minibuffer history, the user can pull the default value into
> the minibuffer with M-n.  It is much nicer to specify it only as the
> default, and let the user decide whether to pull it into the
> minibuffer.

I wasn't aware that completing-read was deprecated - and I think that
is a mistake.  In general, initial input may be annoying, and using
the minibuffer history is preferable, but for specific purposes, being
able to provide the initial input is crusial for proper operation.

Specifically, my `ido.el' package (available from www.cua.dk) is an
enhancement to `iswitchb.el' which uses interactive prompting for both
find-file and switch-to-buffer - and allows easy switching between 
reading a file name and a buffer name.... while retaining the current
input from the user in the minibuffer.

For example, I want to visit the buffer containing the file `thisfile.c'
and start typing `C-x b thisf' when ido-switch-buffer reports "No Match"
because I haven't opened the file yet.  So I just hit C-f which brings
me into ido-find-file with `thisf' as the initial input (usually allowing
me to just hit RET to open the file).

For this purpose, it is necessary to be able to fill the minibuffer
with initial input!

So I would suggest changing the wording of the documentation string to
say that:

"In general, the use of the INITIAL-INPUT should be avoided in favour of
using the minibuffer history, i.e. it is best to pass nil for INITIAL-INPUT."

Also, the documentation string for completing-read should mention that the
HIST argument defaults to `minibuffer-history' when nil.

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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