Next: , Previous: Pop-Up Frame, Up: Completing Words


4.9 Completion Menu and Browser

Calling completion-show-menu when completing, bound to M-Down, will bring up the completion menu, from which you can select a completion to insert. If completion-use-hotkeys is enabled, the menu will also display the hotkeys next to the completions they select, although you will have to exit the menu before you can use them (see Completion Hotkeys).

The completion menu also contains a Browser entry, which replaces the completion menu with the completion browser. This hierarchically lists all possible completions, irrespective of the setting of completion-max-candidates (see Miscellaneous Options). If it's taking too long to construct the browser, you can hit C-g to cancel it. You can also display the browser directly using completion-show-browser-menu (not bound to any key by default).

The completion menu can be displayed automatically when completing, optionally after a time-delay, though because it steals the keyboard focus this is less useful than auto-displaying the tooltip or pop-up frame. See Auto-Show a List of Completions.

The following variables affect the behaviour of the completion menu and browser:

completion-menu-offset
A cons cell containing the number of pixels (an integer) by which to offset the menu by in the x and y directions (car and cdr, respectively).
completion-browser-max-items
Maximum number of completions to display in a completion browser menu. If there are more completions than this in a menu, the menu will be divided into submenus, and if necessary the submenus will be further divided into subsubmenus, and so on ad infinitum. Default is to 25.
completion-browser-buckets
Chooses the algorithm used to subdivide browser menus into submenus. The symbol balance causes the number of entries in all menus, submenus, subsubmenus etc. to be made as equal as possible. The symbol max maximizes the number of entries in higher level menus (and hence minimizes the number of entries in lower level submenus), whereas minimize does the opposite. Note that none of these options affect the number of levels of submenu required in a given browser instance.
completion-browser-buckets
When set, the completion browser will recursively list completions of completions (of completions of completions...), organised hierarchically. Otherwise, the browser will only display the original list of all completions of the prefix.