@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 00, 2001
-@c Free Software Foundation, Inc.
+@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
+@c 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Minibuffer, M-x, Basic, Top
@chapter The Minibuffer
prompt normally ends with a colon.
@cindex default argument
- Sometimes a @dfn{default argument} appears in parentheses after the
+ Sometimes a @dfn{default argument} appears in parentheses before the
colon; it too is part of the prompt. The default will be used as the
argument value if you enter an empty argument (that is, just type
@key{RET}). For example, commands that read buffer names always show a
@cindex // in file name
@cindex double slash in file name
@cindex slashes repeated in file name
+@findex file-name-shadow-mode
GNU Emacs gives a special meaning to a double slash (which is not
-normally a useful thing to write): it means, ``ignore everything before
-the second slash in the pair.'' Thus, @samp{/u2/emacs/src/} is ignored
-in the example above, and you get the file @file{/etc/termcap}.
+normally a useful thing to write): it means, ``ignore everything
+before the second slash in the pair.'' Thus, @samp{/u2/emacs/src/} is
+ignored in the example above, and you get the file
+@file{/etc/termcap}. The ignored part of the file name is dimmed if
+the terminal allows it; to disable this, turn off
+@code{file-name-shadow-mode} minor mode.
If you set @code{insert-default-directory} to @code{nil}, the default
directory is not inserted in the minibuffer. This way, the minibuffer
argument. @kbd{?} is defined to display a list of possible completions
of what you have inserted.
- For example, when @kbd{M-x} uses the minibuffer to read the name of a
-command, it provides a list of all available Emacs command names to
+ For example, when @kbd{M-x} uses the minibuffer to read the name of
+a command, it provides a list of all available Emacs command names to
complete against. The completion keys match the minibuffer text
against all the command names, find any additional name characters
implied by the ones already present in the minibuffer, and add those
characters to the ones you have given. This is what makes it possible
to type @kbd{M-x ins @key{SPC} b @key{RET}} instead of @kbd{M-x
-insert-buffer @key{RET}} (for example).
+insert-buffer @key{RET}} (for example). (@key{SPC} does not do
+completion in reading file names, because it is common to use spaces
+in file names on some systems.)
Case is normally significant in completion, because it is significant
in most of the names that you can complete (buffer names, file names and
Completion does ignore case distinctions for certain arguments in which
case does not matter.
+ Completion acts only on the text before point. If there is text in
+the minibuffer after point---i.e., if you move point backward after
+typing some text into the minibuffer---it remains unchanged.
+
@menu
* Example: Completion Example. Examples of using completion.
* Commands: Completion Commands. A list of completion commands.
Complete the text before point in the minibuffer as much as possible
(@code{minibuffer-complete}).
@item @key{SPC}
-Complete the minibuffer text before point, but don't go beyond one word
-(@code{minibuffer-complete-word}).
+Complete the minibuffer text before point, but don't go beyond one
+word (@code{minibuffer-complete-word}). @key{SPC} for completion is
+not available when entering a file name, since some users often put
+spaces in filenames.
@item @key{RET}
Submit the text in the minibuffer as the argument, possibly completing
-first as described below (@code{minibuffer-complete-and-exit}).
+first as described
+@iftex
+in the next subsection (@code{minibuffer-complete-and-exit}).
+@end iftex
+@ifnottex
+in the next node (@code{minibuffer-complete-and-exit}). @xref{Strict
+Completion}.
+@end ifnottex
@item ?
Display a list of all possible completions of the text in the minibuffer
-(@code{minibuffer-list-completions}).
+(@code{minibuffer-completion-help}).
@end table
@kindex SPC
@code{partial-completion-mode}. This binds the partial completion
commands to @key{TAB}, @key{SPC}, @key{RET}, and @kbd{?}. The usual
completion commands are available on @kbd{M-@key{TAB}} (or
-@mbd{C-M-i}), @kbd{M-@key{SPC}}, @kbd{M-@key{RET}} and @kbd{M-?}.
+@kbd{C-M-i}), @kbd{M-@key{SPC}}, @kbd{M-@key{RET}} and @kbd{M-?}.
@vindex PC-include-file-path
@vindex PC-disable-includes
Another feature of Partial Completion mode is to extend
-@code{find-file} so that the @samp{<@var{include}>} stands for the
+@code{find-file} so that @samp{<@var{include}>} stands for the
file named @var{include} in some directory in the path
@code{PC-include-file-path}. If you set @code{PC-disable-includes} to
non-@code{nil}, this feature is disabled.