Function: consult-line-multi
consult-line-multi is an interactive and natively compiled function
defined in consult.el.
Signature
(consult-line-multi QUERY &optional INITIAL)
Documentation
Search for a matching line in multiple buffers.
By default search across all project buffers. If the prefix
argument QUERY is non-nil, all buffers are searched. Optional
INITIAL input can be provided. The symbol at point and the last
isearch-string is added to the future history. In order to
search a subset of buffers, QUERY can be set to a plist according
to consult--buffer-query.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/6higv2v1wk916v4ynnybyrdkfy2gq44d-emacs-packages-deps/share/emacs/site-lisp/elpa/consult-20261004.957/consult.el
;;;###autoload
(defun consult-line-multi (query &optional initial)
"Search for a matching line in multiple buffers.
By default search across all project buffers. If the prefix
argument QUERY is non-nil, all buffers are searched. Optional
INITIAL input can be provided. The symbol at point and the last
`isearch-string' is added to the future history. In order to
search a subset of buffers, QUERY can be set to a plist according
to `consult--buffer-query'."
(interactive "P")
(unless (keywordp (car-safe query))
(setq query (list :sort 'alpha-current :directory (and (not query) 'project))))
(pcase-let* ((`(,prompt . ,buffers) (consult--buffer-query-prompt "Go to line" query))
(collection (consult--dynamic-collection
(apply-partially #'consult--line-multi-candidates
buffers))))
(consult--read
collection
:prompt prompt
:annotate (consult--line-fontify)
:category 'consult-location
:sort nil
:require-match t
;; Always add last Isearch string to future history
:add-history (delq nil (list (thing-at-point 'symbol) isearch-string))
:history '(:input consult--line-multi-history)
:lookup #'consult--line-multi-match
;; Add `isearch-string' as initial input if starting from Isearch
:initial (or initial
(and isearch-mode
(prog1 isearch-string (isearch-done))))
:state (consult--location-state collection)
:group #'consult--line-multi-group)))