Function: embark-consult-export-grep

embark-consult-export-grep is a natively compiled function defined in embark-consult.el.

Signature

(embark-consult-export-grep LINES)

Documentation

Create a grep mode buffer listing LINES.

The elements of LINES should be completion candidates with category consult-grep.

Source Code

;; Defined in /nix/store/9j1lpwknj0cd46jf87pww3rp6rcmnk70-emacs-packages-deps/share/emacs/site-lisp/elpa/embark-consult-20260503.118/embark-consult.el
(defun embark-consult-export-grep (lines)
  "Create a grep mode buffer listing LINES.
The elements of LINES should be completion candidates with
category `consult-grep'."
  (embark-consult--export-grep
   :header "Exported grep results:\n\n"
   :lines lines
   :insert
   (lambda (lines)
     (dolist (line lines) (insert line "\n"))
     (goto-char (point-min))
     (let ((count 0) prop)
       (while (setq prop (text-property-search-forward
                          'face 'consult-highlight-match t))
         (incf count)
         (put-text-property (prop-match-beginning prop)
                            (prop-match-end prop)
                            'font-lock-face
                            'match))
       count))
   :footer #'ignore))