Next: Yes-or-No Queries, Previous: Minibuffer History, Up: Minibuffers [Contents][Index]
Completion is a feature that fills in the rest of a name
starting from an abbreviation for it. Completion works by comparing the
user’s input against a list of valid names and determining how much of
the name is determined uniquely by what the user has typed. For
example, when you type C-x b (switch-to-buffer
) and then
type the first few letters of the name of the buffer to which you wish
to switch, and then type TAB (minibuffer-complete
), SXEmacs
extends the name as far as it can.
Standard SXEmacs commands offer completion for names of symbols, files, buffers, and processes; with the functions in this section, you can implement completion for other kinds of names.
The try-completion
function is the basic primitive for
completion: it returns the longest determined completion of a given
initial string, with a given set of strings to match against.
The function completing-read
provides a higher-level interface
for completion. A call to completing-read
specifies how to
determine the list of valid names. The function then activates the
minibuffer with a local keymap that binds a few keys to commands useful
for completion. Other functions provide convenient simple interfaces
for reading certain kinds of names with completion.
• Basic Completion: | Low-level functions for completing strings. (These are too low level to use the minibuffer.) | |
• Minibuffer Completion: | Invoking the minibuffer with completion. | |
• Completion Commands: | Minibuffer commands that do completion. | |
• High-Level Completion: | Convenient special cases of completion (reading buffer name, file name, etc.) | |
• Reading File Names: | Using completion to read file names. | |
• Programmed Completion: | Finding the completions for a given file name. |
Next: Yes-or-No Queries, Previous: Minibuffer History, Up: Minibuffers [Contents][Index]