Next: , Previous: Completion Example, Up: Completion

8.4.2 Completion Commands

Here is a list of the completion commands defined in the minibuffer when completion is allowed.

Complete the text in the minibuffer as much as possible; if unable to complete, display a list of possible completions (minibuffer-complete).
Complete up to one word from the minibuffer text before point (minibuffer-complete-word). This command is not available for arguments that often include spaces, such as file names.
Submit the text in the minibuffer as the argument, possibly completing first (minibuffer-complete-and-exit). See Completion Exit.
Display a list of completions (minibuffer-completion-help).

<TAB> (minibuffer-complete) is the most fundamental completion command. It searches for all possible completions that match the existing minibuffer text, and attempts to complete as much as it can. See Completion Styles, for how completion alternatives are chosen.

<SPC> (minibuffer-complete-word) completes like <TAB>, but only up to the next hyphen or space. If you have ‘auto-f’ in the minibuffer and type <SPC>, it finds that the completion is ‘auto-fill-mode’, but it only inserts ‘ill-’, giving ‘auto-fill-’. Another <SPC> at this point completes all the way to ‘auto-fill-mode’.

If <TAB> or <SPC> is unable to complete, it displays a list of matching completion alternatives (if there are any) in another window. You can display the same list with ? (minibuffer-completion-help). The following commands can be used with the completion list:

Typing M-v, while in the minibuffer, selects the window showing the completion list (switch-to-completions). This paves the way for using the commands below. <PageUp> or <prior> does the same. You can also select the window in other ways (see Windows).

While in the completion list buffer, this chooses the completion at point (choose-completion).

While in the completion list buffer, this moves point to the following completion alternative (next-completion).

While in the completion list buffer, this moves point to the previous completion alternative (previous-completion).