Function: consult-compile-error

consult-compile-error is an autoloaded, interactive and byte-compiled function defined in consult-compile.el.

Signature

(consult-compile-error &optional ARG GREP)

Documentation

Jump to a compilation error related to the current project or file.

This command collects entries from all related compilation buffers. The command supports preview of the currently selected error. With prefix ARG, jump to the error message in the compilation buffer, instead of to the actual location of the error. If GREP is non-nil, Grep buffers are searched. See also consult-grep-match.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult-compile.el
;;;###autoload
(defun consult-compile-error (&optional arg grep)
  "Jump to a compilation error related to the current project or file.

This command collects entries from all related compilation buffers.  The
command supports preview of the currently selected error.  With prefix
ARG, jump to the error message in the compilation buffer, instead of to
the actual location of the error.  If GREP is non-nil, Grep buffers are
searched.  See also `consult-grep-match'."
  (interactive "P")
  (consult--read
   (or (mapcan (apply-partially #'consult-compile--candidates grep)
               (or (consult-compile--buffers
                    grep (or (consult--project-root) default-directory))
                   (user-error "No related buffers")))
       (user-error "No %s" (if grep "matches" "errors")))
   :prompt (format "Go to %s: " (if grep "match" "error"))
   :category 'consult-compile-error
   :sort nil
   :require-match t
   :history t ;; disable history
   :lookup #'consult--lookup-candidate
   :group (consult--type-group consult-compile--narrow)
   :narrow (consult--type-narrow consult-compile--narrow)
   :history '(:input consult-compile--history)
   :state (if arg (consult--jump-state) (consult-compile--state))))