Linux

  1. Home
  2. Computing & Technology
  3. Linux

Completion Example

Emacs Documentation

By Juergen Haas, About.com

Completion Example

A concrete example may help here. If you type M-x au <TAB>, the <TAB> looks for alternatives (in this case, command names) that start with au. There are several, including auto-fill-mode and auto-save-mode--but they are all the same as far as auto-, so the au in the minibuffer changes to auto-.

If you type <TAB> again immediately, there are multiple possibilities for the very next character--it could be any of cfilrs--so no more characters are added; instead, <TAB> displays a list of all possible completions in another window.

If you go on to type f <TAB>, this <TAB> sees auto-f. The only command name starting this way is auto-fill-mode, so completion fills in the rest of that. You now have auto-fill-mode in the minibuffer after typing just au <TAB> f <TAB>. Note that <TAB> has this effect because in the minibuffer it is bound to the command minibuffer-complete when completion is available.

* Emacs Manual Index

Explore Linux

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Linux

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux Software
  5. Editors
  6. Emacs
  7. Emacs Documentation - Completion Example

©2009 About.com, a part of The New York Times Company.

All rights reserved.