Function: projectile-search-mode
projectile-search-mode is an interactive and byte-compiled function
defined in projectile.el.
Signature
(projectile-search-mode)
Documentation
Major mode for reviewing project-wide search matches, read-only.
A search-only sibling of projectile-replace-mode: the buffer is a
read-only listing of every match, grouped by file, with no replacement
preview and no way to edit the files from here. Navigate with
n (projectile-replace--goto-next-match) / p (projectile-replace--goto-prev-match) (match) and M-n (projectile-replace--goto-next-file) / M-p (projectile-replace--goto-prev-file) (file), and RET (projectile-replace--visit)
visits the match under point. The search can be reshaped in place:
c (projectile-replace--toggle-case) toggles case sensitivity,
x (projectile-replace--toggle-regexp) toggles literal/regexp matching and
w (projectile-replace--toggle-word) toggles whole-word matching,
each re-scanning; k (projectile-replace--keep-matches) / d (projectile-replace--flush-matches) keep or flush matches by line and
K (projectile-replace--keep-files) / D (projectile-replace--flush-files) by file; g (projectile-replace--refresh) re-runs the search, undoing any filtering.
r (projectile-search--to-replace) hands the current search off to the reviewable replace UI
(prompting only for the replacement), and e (projectile-replace--export) exports the shown
matches to a grep-mode buffer for wgrep or Emacs 31's grep-edit-mode.
D projectile-replace--flush-files
K projectile-replace--keep-files
M-n projectile-replace--goto-next-file
M-p projectile-replace--goto-prev-file
RET projectile-replace--visit
c projectile-replace--toggle-case
d projectile-replace--flush-matches
e projectile-replace--export
g projectile-replace--refresh
k projectile-replace--keep-matches
n projectile-replace--goto-next-match
p projectile-replace--goto-prev-match
q projectile-replace--quit
r projectile-search--to-replace
w projectile-replace--toggle-word
x projectile-replace--toggle-regexp
In addition to any hooks its parent mode special-mode might have
run, this mode runs the hook projectile-search-mode-hook, as the
final or penultimate step during initialization.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(define-derived-mode projectile-search-mode special-mode "Projectile-Search"
"Major mode for reviewing project-wide search matches, read-only.
A search-only sibling of `projectile-replace-mode': the buffer is a
read-only listing of every match, grouped by file, with no replacement
preview and no way to edit the files from here. Navigate with
\\<projectile-search-mode-map>\\[projectile-replace--goto-next-match] / \\[projectile-replace--goto-prev-match] (match) and \\[projectile-replace--goto-next-file] / \\[projectile-replace--goto-prev-file] (file), and \\[projectile-replace--visit]
visits the match under point. The search can be reshaped in place:
\\[projectile-replace--toggle-case] toggles case sensitivity,
\\[projectile-replace--toggle-regexp] toggles literal/regexp matching and
\\[projectile-replace--toggle-word] toggles whole-word matching,
each re-scanning; \\[projectile-replace--keep-matches] / \\[projectile-replace--flush-matches] keep or flush matches by line and
\\[projectile-replace--keep-files] / \\[projectile-replace--flush-files] by file; \\[projectile-replace--refresh] re-runs the search, undoing any filtering.
\\[projectile-search--to-replace] hands the current search off to the reviewable replace UI
\(prompting only for the replacement), and \\[projectile-replace--export] exports the shown
matches to a `grep-mode' buffer for wgrep or Emacs 31's `grep-edit-mode'.
\\{projectile-search-mode-map}"
(setq-local truncate-lines t)
(setq-local projectile-replace--render-function #'projectile-search--render)
;; killing the buffer mid-scan must not leave a dangling chunk timer
(add-hook 'kill-buffer-hook #'projectile-replace--cancel-scan nil t)
(buffer-disable-undo))