Function: hyrolo-consult-grep

hyrolo-consult-grep is an autoloaded, interactive and byte-compiled function defined in hyrolo.el.

Signature

(hyrolo-consult-grep &optional REGEXP MAX-MATCHES PATH-LIST PROMPT)

Documentation

Interactively search paths with a consult package grep command.

Search for optional REGEXP up to MAX-MATCHES in PATH-LIST or hyrolo-file-list.

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).
Optional PATH-LIST defaults to hyrolo-file-list when not given. 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/hyrolo.el
;;;###autoload
(defun hyrolo-consult-grep (&optional regexp max-matches path-list prompt)
  "Interactively search paths with a consult package grep command.
Search for optional REGEXP up to MAX-MATCHES in PATH-LIST or `hyrolo-file-list'.

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).
Optional PATH-LIST defaults to `hyrolo-file-list' when not given.  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 (concat "--include *.kot --include *.kotl"
				" --include *.md --include *.markdown --include *.mkd --include *.mdown --include *.mkdn --include *.mdwn"
				" --include *.org --include *.otl --include *.outl"))
	 (ripgrep-globs "--glob *.{kot,kotl,md,markdown,mkd,mdown,mkdn,mdwn,org,otl,outl}"))
    (hsys-consult-grep grep-includes ripgrep-globs
		       regexp max-matches
		       (or path-list hyrolo-file-list)
		       (or prompt (if (eq max-matches 0)
				      "Grep HyRolo headlines"
				    "Grep HyRolo files")))))