Function: hywiki-consult-grep

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

Signature

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

Documentation

Interactively search HyWiki pages with a consult package grep command.

Search for optional REGEXP up to MAX-MATCHES in PATH-LIST or hywiki-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/hywiki.el
;;;###autoload
(defun hywiki-consult-grep (&optional regexp max-matches path-list prompt)
  "Interactively search HyWiki pages with a consult package grep command.
Search for optional REGEXP up to MAX-MATCHES in PATH-LIST or `hywiki-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 hywiki-directory))
		       (or prompt (if (eq max-matches 0)
				      "Grep HyWiki dir headlines"
				    "Grep HyWiki dir")))))