Function: projectile-search--render
projectile-search--render is a byte-compiled function defined in
projectile.el.
Signature
(projectile-search--render)
Documentation
Redraw the current search results buffer from its buffer-local state.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-search--render ()
"Redraw the current search results buffer from its buffer-local state."
(let ((inhibit-read-only t)
(root projectile-replace--root)
(matches projectile-replace--matches)
(counts (make-hash-table :test 'equal))
(prev-file nil))
(dolist (m matches)
(cl-incf (gethash (projectile-replace--match-file m) counts 0)))
(erase-buffer)
(insert (projectile-search--header-string))
(insert (substitute-command-keys
(concat "\\<projectile-search-mode-map>"
"\\[projectile-replace--visit] visit "
"\\[projectile-replace--refresh] re-search "
"\\[projectile-search--to-replace] replace these "
"\\[projectile-replace--export] export "
"\\[projectile-replace--quit] quit\n"
"\\[projectile-replace--toggle-case] case "
"\\[projectile-replace--toggle-regexp] regexp/literal "
"\\[projectile-replace--toggle-word] word "
"\\[projectile-replace--keep-matches]/\\[projectile-replace--flush-matches] keep/flush line "
"\\[projectile-replace--keep-files]/\\[projectile-replace--flush-files] keep/flush file\n\n")))
(if (null matches)
(insert "No matches.\n")
(dolist (m matches)
(let ((file (projectile-replace--match-file m)))
(unless (equal prev-file file)
(when prev-file (insert "\n"))
(setq prev-file file)
(insert (projectile-replace--file-header
file root (gethash file counts))))
(insert (projectile-search--render-line m)))))
(when projectile-replace--truncated
(insert (format "\n(showing the first %d matches)\n"
projectile-search-max-matches)))
(goto-char (point-min))))