Automatically focus isearch occur buffer

This commit is contained in:
David Morgan 2023-06-13 13:01:34 +01:00
parent fc5dee85ee
commit 5cad7fedfa
Signed by: djm
GPG Key ID: C171251002C200F2
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,12 @@
'((t (:foreground "gold")))
"Face for isearch minibuffer prompt."
:group 'isearch)
;; https://www.emacs.dyerdwelling.family/emacs/20230503211610-emacs--isearch-occur-advice-window-focus/
(defun isearch-occur-advice (origin &rest args)
(isearch-exit)
(select-window (get-buffer-window "*Occur*"))
(goto-char (point-min)))
(advice-add 'isearch-occur :after 'isearch-occur-advice)
:custom
(search-whitespace-regexp ".*\\b")
(isearch-lax-whitespace t)