Skip to content

consult.el - Search and navigate via completing-read

GNU Emacs GNU ELPA GNU-devel ELPA MELPA Releases MELPA Snapshots

Consult provides search and navigation commands based on the Emacs completion function completing-read documented in the Elisp manual. Completion allows you to quickly select an item from a list of candidates. Consult offers asynchronous and interactive ‘consult-grep’ and ‘consult-ripgrep’ commands, and the line-based search command ‘consult-line’. Furthermore Consult provides an advanced buffer switching command ‘consult-buffer’ to switch between buffers, recently opened files, bookmarks and buffer-like candidates from other sources. Some of the Consult commands are enhanced versions of built-in Emacs commands. For example the command ‘consult-imenu’ presents a flat list of the Imenu with live preview, grouping and narrowing. Please take a look at the full list of commands.

Consult is fully compatible with completion systems centered around the standard Emacs ‘completing-read’ API, Vertico, Mct, and the built-in default completion system and Icomplete.

This package keeps the completion system specifics to a minimum. The ability of the Consult commands to work well with arbitrary completion systems is one of the main advantages of the package. Consult fits well into existing setups and it helps you to create a full completion environment out of small and independent components.

You can combine the complementary packages Marginalia, Embark and Orderless with Consult. Marginalia enriches the completion display with annotations, e.g., documentation strings or file information. The versatile Embark package provides local actions, comparable to a context menu. These actions operate on the selected candidate in the minibuffer or at point in normal buffers. For example, when selecting from a list of files, Embark offers an action to delete the file. Additionally Embark offers a facility to collect completion candidates in a collect buffer. The section Embark integration documents in detail how Consult and Embark work together.

Table of Contents