Function: hsys-org-consult-grep
hsys-org-consult-grep is an autoloaded, interactive and byte-compiled
function defined in hsys-org.el.
Signature
(hsys-org-consult-grep &optional REGEXP MAX-MATCHES PATH-LIST PROMPT)
Documentation
Interactively search org-directory with a consult package grep command.
Search for optional REGEXP up to MAX-MATCHES in PATH-LIST or org-directory.
Use ripgrep (rg) if found, otherwise, plain grep. Initialize search with
optional REGEXP and interactively prompt for changes. Limit matches
per file to the absolute value of MAX-MATCHES, if given and not 0. If
0, match to headlines only (lines that start with a '^[*#]+[ ]+' regexp).
With optional PROMPT string, use this as the first part of the grep prompt;
omit any trailing colon and space in the prompt.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hsys-org.el
;;;###autoload
(defun hsys-org-consult-grep (&optional regexp max-matches path-list prompt)
"Interactively search `org-directory' with a consult package grep command.
Search for optional REGEXP up to MAX-MATCHES in PATH-LIST or `org-directory'.
Use ripgrep (rg) if found, otherwise, plain grep. Initialize search with
optional REGEXP and interactively prompt for changes. Limit matches
per file to the absolute value of MAX-MATCHES, if given and not 0. If
0, match to headlines only (lines that start with a '^[*#]+[ \t]+' regexp).
With optional PROMPT string, use this as the first part of the grep prompt;
omit any trailing colon and space in the prompt."
(interactive "i\nP")
(let* ((grep-includes "--include *.org")
(ripgrep-globs "--glob *.org"))
(hsys-consult-grep grep-includes ripgrep-globs
regexp max-matches (or path-list (list org-directory))
(or prompt (if (eq max-matches 0)
"Grep Org dir headlines"
"Grep Org dir")))))