emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/doc/emacs mini.texi


From: Chong Yidong
Subject: [Emacs-diffs] emacs/doc/emacs mini.texi
Date: Sun, 15 Mar 2009 14:51:36 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/03/15 14:51:36

Modified files:
        doc/emacs      : mini.texi 

Log message:
        * mini.texi (Completion Commands): Describe Emacs 23 completion rules.
        (Completion Options): Document read-file-name-completion-ignore-case,
        read-buffer-completion-ignore-case, and completion-styles.  Remove
        description of partial-completion-mode.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/emacs/mini.texi?cvsroot=emacs&r1=1.12&r2=1.13

Patches:
Index: mini.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/emacs/mini.texi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- mini.texi   20 Feb 2009 12:36:51 -0000      1.12
+++ mini.texi   15 Mar 2009 14:51:36 -0000      1.13
@@ -262,8 +262,8 @@
 @table @kbd
 @item @key{TAB}
 @findex minibuffer-complete
-Complete the text before point in the minibuffer as much as possible;
-if unable to complete, display a list of possible completions
+Complete the text in the minibuffer as much as possible; if unable to
+complete, display a list of possible completions
 (@code{minibuffer-complete}).
 @item @key{SPC}
 Complete up to one word from the minibuffer text before point
@@ -284,6 +284,42 @@
 (@code{minibuffer-completion-help}).
 @end table
 
address@hidden TAB
address@hidden minibuffer-complete
+  @key{TAB} (@code{minibuffer-complete}) is the most fundamental
+completion command.  It searches for all possible completion
+alternatives that match the existing minibuffer text, and attempts to
+complete as much as it can.  The matching of completion alternatives
+to the minibuffer text is performed according to somewhat intricate
+rules, which are designed so that plausible completions are offered
+under most circumstances.  A valid completion alternative must satisfy
+the following criteria:
+
address@hidden @bullet
address@hidden
+The minibuffer text before point must be the same as the beginning of
+the completion alternative.  If there is any minibuffer text after
+point, it must be a substring of the remainder of the completion
+alternative.
+
address@hidden
+If no completion alternative satisfies the above rules, try using
address@hidden completion} rules: divide the minibuffer text into words
+separated by hyphens or spaces, and complete each word separately.
+Thus, when completing command names, @samp{em-l-m} completes to
address@hidden
+
address@hidden
+If there is still no completion alternative, try the first rule again,
+but ignore the minibuffer text after point (i.e., don't try matching
+it).
address@hidden itemize
+
address@hidden
+When performing these comparisons, a @samp{*} in the minibuffer text
+acts as a @dfn{wildcard}---it matches any character at the
+corresponding position in the completion alternative.
+
 @kindex SPC
 @findex minibuffer-complete-word
   @key{SPC} (@code{minibuffer-complete-word}) completes like
@@ -293,8 +329,9 @@
 giving @samp{auto-fill-}.  Another @key{SPC} at this point completes
 all the way to @samp{auto-fill-mode}.
 
-  When you display a list of possible completions, you can choose
-one from it:
+  If @key{TAB} or @key{SPC} is unable to complete, it displays a list
+of possible completions (if there are any) in a separate window.  You
+can choose a completion from this list using the following commands:
 
 @table @kbd
 @findex mouse-choose-completion
@@ -401,35 +438,29 @@
 @code{completion-ignored-extensions} that do not end in a slash are
 ordinary file names.
 
address@hidden Partial Completion mode
address@hidden partial-completion-mode
address@hidden partial-completion-mode
-  Partial Completion mode implements a more powerful kind of
-completion that can complete multiple words in parallel.  For example,
-it can complete the command name abbreviation @code{p-b} into
address@hidden if no other command starts with two words whose
-initials are @samp{p} and @samp{b}.
-
-  To enable this mode, use @kbd{M-x partial-completion-mode} or
-customize the variable @code{partial-completion-mode}.  This mode
-binds special partial completion commands to @key{TAB}, @key{SPC},
address@hidden, and @kbd{?} in the minibuffer.  The usual completion
-commands are available on @address@hidden (or @kbd{C-M-i}),
address@hidden@key{SPC}}, @address@hidden and @kbd{M-?}.
-
-  Partial completion of directories in file names uses @samp{*} to
-indicate the places for completion; thus, @file{/u*/b*/f*} might
-complete to @file{/usr/bin/foo}.  For remote files, partial completion
-enables completion of methods, user names and host names.
address@hidden Files}.
-
address@hidden PC-include-file-path
address@hidden PC-disable-includes
-  Partial Completion mode also extends @code{find-file} so that
address@hidden<@var{include}>} looks for the file named @var{include} in the
-directories in the path @code{PC-include-file-path}.  If you set
address@hidden to address@hidden, this feature is
-disabled.
address@hidden case-sensitivity and completion
address@hidden read-file-name-completion-ignore-case
address@hidden read-buffer-completion-ignore-case
+  When completing file names, Emacs ignores case differences if the
+variable @code{read-file-name-completion-ignore-case} is
address@hidden  The default value is @code{nil} on systems that have
+case-sensitive file-names, such as GNU/Linux; it is address@hidden on
+systems that have case-insensitive file-names, such as Microsoft
+Windows.  When completing buffer names, Emacs ignores case differences
+if @code{read-buffer-completion-ignore-case} is address@hidden (the
+default value is @code{nil}).
+
address@hidden completion-styles
+  You can customize the matching rules for completion alternatives
+using the variable @code{completion-styles}.  Its value should be a
+list of symbols, each representing a @dfn{completion style}; valid
+style symbols are @code{basic}, @code{partial-completion},
address@hidden, and @code{emacs21}.  When completing, Emacs attempts
+to use the first completion style in the list; if this does not return
+any completion alternatives, it tries the next completion style in the
+list, and so on.  The completion rules described in @ref{Completion
+Commands} correspond to the default value of @code{completion-styles},
+which is @code{(basic partial-completion emacs22)}.
 
 @cindex Icomplete mode
 @findex icomplete-mode




reply via email to

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