File: consult.el.html

Consult implements a set of consult-<thing> commands, which aim to improve the way you use Emacs. The commands are founded on completing-read, which selects from a list of candidate strings. Consult provides an enhanced buffer switcher consult-buffer and search and navigation commands like consult-imenu and consult-line. Searching through multiple files is supported by the asynchronous consult-grep command. Many Consult commands support previewing candidates. If a candidate is selected in the completion view, the buffer shows the candidate immediately.

The Consult commands are compatible with multiple completion systems based on the Emacs completing-read API, including the default completion system, Vertico, Mct and Icomplete.

See the README for an overview of the available Consult commands and the documentation of the configuration and installation of the package.

The full list of contributors can be found in the acknowledgments section of the README.

Defined variables (80)

consult--annotate-align-stepRound candidate width.
consult--annotate-align-widthMaximum candidate width used for annotation alignment.
consult--async-logBuffer for async logging output used by ‘consult--async-process’.
consult--buffer-displayBuffer display function.
consult--completion-candidate-hookGet candidate from completion system.
consult--completion-refresh-hookRefresh completion system.
consult--convert-regexp-tableRegexp conversion table.
consult--customize-alistCommand configuration alist for fine-grained configuration.
consult--focus-lines-indicatorMode line indicator displayed if ‘consult-focus-lines’ is active.
consult--focus-lines-overlaysOverlays used by ‘consult-focus-lines’.
consult--gc-percentageLarge GC percentage for temporary increase.
consult--gc-thresholdLarge GC threshold for temporary increase.
consult--grep-match-regexpRegexp used to match file and line of grep output.
consult--narrowCurrent narrow key.
consult--narrow-configNarrowing config of the current completion.
consult--narrow-overlayNarrowing indicator overlay.
consult--preview-functionMinibuffer-local variable which exposes the current preview function.
consult--process-chunkIncrease process output chunk size.
consult--regexp-compilerRegular expression compiler used by ‘consult-grep’ and other commands.
consult--tofu-charSpecial character used to encode line suffixes for disambiguation.
consult--tofu-rangeSpecial character range.
consult--tofu-regexpSpecial character regexp.
consult-after-jump-hookFunction called after jumping to a location.
consult-async-indicatorAsync indicator characters and faces.
consult-async-input-debounceInput debounce for asynchronous commands.
consult-async-input-throttleInput throttle for asynchronous commands.
consult-async-mapKeymap added for commands with asynchronous candidates.
consult-async-min-inputMinimum number of characters needed, before asynchronous process is called.
consult-async-refresh-delayRefreshing delay of the completion UI for asynchronous commands.
consult-async-split-styleAsync splitting style, see ‘consult-async-split-styles-alist’.
consult-async-split-styles-alistAsync splitting styles.
consult-bookmark-narrowBookmark narrowing configuration.
consult-buffer-filterFilter regexps for ‘consult-buffer’.
consult-buffer-list-functionList of buffers to use for selection.
consult-buffer-sourcesSources used by ‘consult-buffer’.
consult-fd-argsCommand line arguments for fd, see ‘consult-fd’.
consult-find-argsCommand line arguments for find, see ‘consult-find’.
consult-fontify-max-sizeAvoid whole-buffer fontification for buffers larger than this character limit.
consult-fontify-preservePreserve fontification for line-based commands.
consult-git-grep-argsCommand line arguments for git-grep, see ‘consult-git-grep’.
consult-goto-line-numbersShow line numbers for ‘consult-goto-line’.
consult-grep-argsCommand line arguments for grep, see ‘consult-grep’.
consult-grep-max-columnsMaximal number of columns of grep output.
consult-isearch-history-mapAdditional keymap used by ‘consult-isearch-history’.
consult-line-numbers-widenShow absolute line numbers when narrowing is active.
consult-line-start-from-topStart search from the top if non-nil.
consult-locate-argsCommand line arguments for locate, see ‘consult-locate’.
consult-man-argsCommand line arguments for man, see ‘consult-man’.
consult-mode-command-filterFilter commands for ‘consult-mode-command’.
consult-mode-historiesAlist of mode histories (mode history index bol).
consult-narrow-keyPrefix key for narrowing during completion.
consult-narrow-mapNarrowing keymap which is added to the local minibuffer map.
consult-point-placementWhere to leave point when jumping to a match.
consult-preview-allowed-hooksList of hooks, which should be executed during file preview.
consult-preview-excluded-buffersBuffers excluded from preview.
consult-preview-excluded-filesList of regexps matched against names of files, which are not previewed.
consult-preview-keyPreview trigger keys, can be nil, ‘any’, a single key or a list of keys.
consult-preview-max-countNumber of file buffers to keep open temporarily during preview.
consult-preview-partial-chunkPartial preview chunk size in bytes.
consult-preview-partial-sizeFiles larger than this byte limit are previewed partially.
consult-preview-variablesVariables which are bound for file preview.
consult-project-buffer-sourcesSources used by ‘consult-project-buffer’.
consult-project-functionFunction which returns project root directory.
consult-ripgrep-argsCommand line arguments for ripgrep, see ‘consult-ripgrep’.
consult-source-bookmarkBookmark source for ‘consult-buffer’.
consult-source-bufferBuffer source for ‘consult-buffer’.
consult-source-buffer-registerBuffer register source.
consult-source-file-registerFile register source.
consult-source-hidden-bufferHidden buffer source for ‘consult-buffer’.
consult-source-modified-bufferModified buffer source for ‘consult-buffer’.
consult-source-other-bufferSource for ‘consult-buffer’ for buffers from other frames or tabs.
consult-source-project-bufferProject buffer source for ‘consult-buffer’.
consult-source-project-buffer-hiddenLike ‘consult-source-project-buffer’ but hidden by default.
consult-source-project-recent-fileProject file source for ‘consult-buffer’.
consult-source-project-recent-file-hiddenLike ‘consult-source-project-recent-file’ but hidden by default.
consult-source-project-rootKnown project root source.
consult-source-project-root-hiddenLike ‘consult-source-project-root’ but hidden by default.
consult-source-recent-fileRecent file source for ‘consult-buffer’.
consult-themesList of themes (symbols or regexps) to be presented for selection.
consult-widen-keyKey used for widening during completion.

Defined functions (254)

consult--add-history(ASYNC ITEMS)
consult--annotate-align(CAND ANN)
consult--async-debug(PREFIX)
consult--async-dynamic(FUN &optional RESTART)
consult--async-filter(FUN)
consult--async-highlight(&optional HIGHLIGHT)
consult--async-indicator()
consult--async-log(FORMATTED &rest ARGS)
consult--async-map(FUN)
consult--async-merge(ASYNCS)
consult--async-merge-sink(SINK INDICATOR TAIL IDX)
consult--async-min-input(&optional MIN-INPUT)
consult--async-options()
consult--async-p(FUN)
consult--async-pipeline(&rest ASYNC)
consult--async-predicate(PRED)
consult--async-process(BUILDER &rest PROPS)
consult--async-refresh(&optional DELAY)
consult--async-sink()
consult--async-split(&optional STYLE)
consult--async-static(ITEMS)
consult--async-throttle(&optional THROTTLE DEBOUNCE)
consult--async-transform(FUN)
consult--async-transform-by-input(FUN)
consult--async-wrap(ASYNC)
consult--bookmark-action(BM)
consult--bookmark-candidates()
consult--bookmark-preview()
consult--bookmark-state()
consult--buffer-action(BUFFER &optional NORECORD)
consult--buffer-file-hash()
consult--buffer-pair(BUFFER)
consult--buffer-preview()
consult--buffer-query
consult--buffer-query-prompt(PROMPT QUERY)
consult--buffer-register-p(REG)
consult--buffer-sort-alpha(BUFFERS)
consult--buffer-sort-alpha-current(BUFFERS)
consult--buffer-sort-visibility(BUFFERS)
consult--buffer-state()
consult--buffer-substring(BEG END &optional FONTIFY)
consult--build-args(ARG)
consult--command-split(STR)
consult--compile-regexp(INPUT TYPE IGNORE-CASE)
consult--completion-filter(PATTERN CANDS CATEGORY HIGHLIGHT)
consult--completion-filter-complement(PATTERN CANDS CATEGORY)
consult--completion-filter-dispatch(PATTERN CANDS CATEGORY HIGHLIGHT)
consult--completion-table-in-buffer(TABLE &optional BUFFER)
consult--completion-window-p()
consult--convert-regexp(REGEXP TYPE)
consult--copy-faces(BEG END STR)
consult--copy-property(BEG END STR PROP)
consult--count-lines(POS)
consult--current-history()
consult--customize-args(OPTIONS &rest DEFAULTS)
consult--customize-put(CMDS PROP FORM)
consult--default-completion-list-candidate()
consult--default-completion-list-preview()
consult--default-completion-list-preview-setup()
consult--default-completion-list-refresh()
consult--default-completion-minibuffer-candidate()
consult--default-project-function(MAY-PROMPT)
consult--default-regexp-compiler(INPUT TYPE IGNORE-CASE)
consult--define-state(TYPE)
consult--directory-prompt(PROMPT DIR)
consult--display-width(STRING)
consult--dynamic-collection
consult--each-line(BEG END &rest BODY)
consult--fast-abbreviate-file-name(NAME)
consult--fd-make-builder(PATHS)
consult--file-action(FILE)
consult--file-preview()
consult--file-register-p(REG)
consult--file-state()
consult--filter-find-file-hook(ORIG &rest HOOKS)
consult--find(PROMPT BUILDER INITIAL)
consult--find-file-temporarily(NAME)
consult--find-file-temporarily-1(NAME)
consult--find-highlights(STR START &rest IGNORED-FACES)
consult--find-make-builder(PATHS)
consult--focus-lines-state(FILTER)
consult--fontify-region(START END)
consult--forbid-minibuffer()
consult--format-file-line-match(FILE LINE MATCH)
consult--frame-buffer-list()
consult--get-location(CAND)
consult--git-grep-make-builder(PATHS)
consult--global-mark-candidates(MARKERS)
consult--goto-line-position(STR MSG)
consult--grep(PROMPT MAKE-BUILDER DIR INITIAL)
consult--grep-exclude-args()
consult--grep-format(BUILDER)
consult--grep-lookahead-p(&rest CMD)
consult--grep-make-builder(PATHS)
consult--grep-position(CAND &optional FIND-FILE)
consult--grep-state()
consult--highlight-literals(LITERALS IGNORE-CASE STR)
consult--highlight-regexps(REGEXPS IGNORE-CASE STR)
consult--icomplete-refresh()
consult--in-buffer(FUN &optional BUFFER)
consult--in-range-p(POS)
consult--in-region(START END TABLE PREDICATE)
consult--insertion-preview(START END)
consult--invisible-open-permanently()
consult--invisible-open-temporarily()
consult--isearch-history-candidates()
consult--join-regexps(REGEXPS TYPE)
consult--join-regexps-permutations(REGEXPS ESC)
consult--jump(POS)
consult--jump-ensure-buffer(POS)
consult--jump-preview()
consult--jump-state()
consult--keep!(LIST FORM)
consult--keep-lines-state(FILTER)
consult--key-parse(KEY)
consult--left-truncate-file(FILE)
consult--line-candidates(TOP CURR-LINE)
consult--line-fontify(&optional CURR-LINE)
consult--line-match(SELECTED CANDIDATES INPUT &rest _)
consult--line-multi-candidates(BUFFERS INPUT CALLBACK)
consult--line-multi-group(CAND TRANSFORM)
consult--line-multi-match(SELECTED CANDIDATES &rest _)
consult--line-point-placement(SELECTED CANDIDATES HIGHLIGHTED &rest IGNORED-FACES)
consult--line-with-mark(MARKER)
consult--local-let(BINDS &rest BODY)
consult--locate-builder(INPUT)
consult--location-candidate(CAND MARKER LINE TOFU &rest PROPS)
consult--location-state(CANDIDATES)
consult--lookup-candidate(SELECTED CANDIDATES &rest _)
consult--lookup-cdr(SELECTED CANDIDATES &rest _)
consult--lookup-cons(SELECTED CANDIDATES &rest _)
consult--lookup-location(SELECTED CANDIDATES &rest _)
consult--lookup-member(SELECTED CANDIDATES &rest _)
consult--lookup-prop(PROP SELECTED CANDIDATES &rest _)
consult--make-overlay(BEG END &rest PROPS)
consult--man-action(PAGE &optional NODISPLAY)
consult--man-builder(INPUT)
consult--man-format(LINES)
consult--man-preview()
consult--man-state()
consult--mark-candidates(MARKERS)
consult--marker-from-line-column(BUFFER LINE COLUMN)
consult--minibuffer-message(&rest MSG)
consult--minor-mode-candidates()
consult--mode-command-candidates(MODES)
consult--mode-name(MODE)
consult--multi(SOURCES &rest OPTIONS)
consult--multi-annotate(SOURCES CAND)
consult--multi-async(SOURCES)
consult--multi-collection(SOURCES)
consult--multi-enabled-sources(SOURCES)
consult--multi-group(SOURCES CAND TRANSFORM)
consult--multi-items(IDX SRC ITEMS)
consult--multi-lookup(SOURCES SELECTED CANDIDATES INPUT NARROW &rest _)
consult--multi-narrow(SOURCES)
consult--multi-predicate(SOURCES CAND)
consult--multi-preview-key(SOURCES)
consult--multi-source(SOURCES CAND)
consult--multi-state(SOURCES)
consult--multi-visible-p(SRC)
consult--narrow-setup(CONFIG MAP)
consult--normalize-directory(DIR)
consult--original-window()
consult--outline-candidates()
consult--plist-remove(KEYS PLIST)
consult--point-placement(STR START &rest IGNORED-FACES)
consult--prefix-group(CAND TRANSFORM)
consult--preview-add-buffer(LIST BUF &optional NAME)
consult--preview-allowed-p(FUN)
consult--preview-append-local-pch(FUN)
consult--preview-key-debounce(PREVIEW-KEY CAND)
consult--preview-key-normalize(PREVIEW-KEY)
consult--preview-rename-buffer(BUF &optional NAME)
consult--process-collection
consult--project-known-roots()
consult--project-name(DIR)
consult--project-root(&optional MAY-PROMPT)
consult--prompt
consult--prompt-1
consult--read
consult--read-1
consult--read-affixate(FUN CANDS)
consult--read-from-kill-ring()
consult--regexp-filter(REGEXPS)
consult--remove-dups(LIST)
consult--require-minibuffer()
consult--ripgrep-make-builder(PATHS)
consult--setup-keymap(KEYMAP ASYNC NARROW PREVIEW-KEY)
consult--slow-operation(MESSAGE &rest BODY)
consult--split-escaped(STR)
consult--split-none(STR &optional PLIST)
consult--split-perl(STR &optional PLIST)
consult--split-separator(STR PLIST)
consult--split-setup(SPLIT)
consult--state-with-return(STATE RETURN)
consult--string-hash(STRINGS)
consult--temporary-files()
consult--tofu-append(CAND ID)
consult--tofu-encode(N)
consult--tofu-get(CAND)
consult--tofu-hide-in-minibuffer(&rest _)
consult--tofu-p(CHAR)
consult--tofu-strip(STR)
consult--type-group(TYPES)
consult--type-narrow(TYPES)
consult--valid-regexp-p(RE)
consult--vertico-candidate()
consult--vertico-refresh()
consult--widen-key()
consult--with-async(ASYNC &rest BODY)
consult--with-async-f(ASYNC BODY)
consult--with-increased-gc(&rest BODY)
consult--with-preview(PREVIEW-KEY STATE TRANSFORM CANDIDATE SAVE-INPUT &rest BODY)
consult--with-preview-f(PREVIEW-KEY STATE TRANSFORM CANDIDATE SAVE-INPUT BODY)
consult--with-project(&rest BODY)
consult--with-project-f(BODY)
consult-bookmark(NAME)
consult-buffer(&optional SOURCES)
consult-buffer-other-frame()
consult-buffer-other-tab()
consult-buffer-other-window()
consult-completion-in-region(START END TABLE PREDICATE)
consult-complex-command()
consult-customize(&rest ARGS)
consult-fd(&optional DIR INITIAL)
consult-find(&optional DIR INITIAL)
consult-focus-lines(FILTER &optional SHOW INITIAL)
consult-git-grep(&optional DIR INITIAL)
consult-global-mark(&optional MARKERS)
consult-goto-line(&optional ARG)
consult-grep(&optional DIR INITIAL)
consult-grep-match(&optional ARG)
consult-history(&optional HISTORY INDEX BOL)
consult-isearch-backward(&optional REVERSE)
consult-isearch-forward(&optional REVERSE)
consult-isearch-history()
consult-keep-lines(FILTER &optional INITIAL)
consult-line(&optional INITIAL START)
consult-line-multi(QUERY &optional INITIAL)
consult-locate(&optional INITIAL)
consult-man(&optional INITIAL)
consult-mark(&optional MARKERS)
consult-minor-mode-menu()
consult-mode-command(&rest MODES)
consult-narrow(KEY)
consult-narrow-help()
consult-outline(&optional LEVEL)
consult-project-buffer()
consult-recent-file()
consult-ripgrep(&optional DIR INITIAL)
consult-theme(THEME)
consult-yank-from-kill-ring(STRING &optional ARG)
consult-yank-pop(&optional ARG)
consult-yank-replace(STRING)

Defined faces (20)

consult-async-failedFace used if asynchronous process has failed.
consult-async-finishedFace used if asynchronous process has finished.
consult-async-optionFace used to highlight asynchronous command options.
consult-async-runningFace used if asynchronous process is running.
consult-async-splitFace used to highlight punctuation character.
consult-bookmarkFace used to highlight bookmarks in ‘consult-buffer’.
consult-bufferFace used to highlight buffers in ‘consult-buffer’.
consult-fileFace used to highlight files in ‘consult-buffer’.
consult-grep-contextFace used to highlight grep context in ‘consult-grep’.
consult-helpFace used to highlight help, e.g., in ‘consult-register-store’.
consult-highlight-markFace used for mark positions in completion candidates. Used for example by ‘consult-mark’. The face should be different than the ‘cursor’ face to avoid confusion.
consult-highlight-matchFace used to highlight matches in the completion candidates. Used for example by ‘consult-grep’.
consult-keyFace used to highlight keys, e.g., in ‘consult-register’.
consult-line-numberFace used to highlight location line in ‘consult-global-mark’.
consult-line-number-prefixFace used to highlight line number prefixes.
consult-line-number-wrappedFace used to highlight line number prefixes after wrap around.
consult-narrow-indicatorFace used for the narrowing indicator.
consult-preview-insertionFace used for previews of text to be inserted. Used by ‘consult-completion-in-region’, ‘consult-yank’ and ‘consult-history’.
consult-preview-lineFace used for line previews.
consult-preview-matchFace used for match previews, e.g., in ‘consult-line’.