Function: projectile-search--rg-executable

projectile-search--rg-executable is a byte-compiled function defined in projectile.el.

Signature

(projectile-search--rg-executable)

Documentation

Return the ripgrep executable name if available, else nil.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
;;; Ripgrep fast-path for the read-only literal search reviewer
;;
;; An optional accelerator for `projectile-search-review': when the search is
;; literal, `rg' is installed and `projectile-search-use-ripgrep' is on, the
;; candidate scan runs `rg --json' as a subprocess and parses its NDJSON match
;; stream into the very same `projectile-replace--match' structs the elisp scan
;; produces, streaming them into the results buffer.  Only the fields the
;; search reviewer renders are filled (file, line, character column, matched
;; string, context line); the write-back-only fields (`beg'/`end'/`match-data'/
;; `groups') stay nil because the search->replace bridge re-gathers via elisp.
;; This path is deliberately narrow: the interactive regexp search command
;; keeps the elisp scan (rg's Rust regex is not Emacs regexp) and the whole
;; replace reviewer keeps the elisp scan (its apply needs exact buffer
;; positions).  A command that builds its own pattern and can also spell it in
;; rg's syntax may pass that spelling as `projectile-replace--rg-pattern' and
;; get the fast-path for a non-literal search too - `projectile-todos' does.
;; The elisp scan stays the default and the fallback; rg is purely additive.

(defun projectile-search--rg-executable ()
  "Return the ripgrep executable name if available, else nil."
  (and (executable-find "rg") "rg"))