>> (setq-local overriding-terminal-local-map isearch-mode-map) >> >> fails with an error: >> >> Debugger entered--Lisp error: (error "Symbol overriding-terminal-local-map may not be buffer-local") >> make-local-variable(overriding-terminal-local-map) >> (set (make-local-variable 'overriding-terminal-local-map) isearch-mode-map) >> isearch-mode(t nil nil nil) >> isearch-forward(nil 1) > > Is this overriding map there just so that `isearch-mode-map' takes > precedence over other minor mode maps? If so, couldn't this be achieved > by manipulating minor-mode-map-alist to put Isearch's map at the top? > Maybe that can be done buffer-locally. According to (info "(elisp) Searching Keymaps") the next keymap to try is `overriding-local-map`. It can be set buffer-locally. And indeed, with the following patch you can set a few commands to not exit isearch: (put 'other-window 'isearch-scroll t) (put 'eval-expression 'isearch-scroll t) Then switching to another buffer with 'C-x o', or switching to the minibuffer with 'M-:' leaves the local isearch active in the original buffer. After switching back to the original buffer, or after exiting the minibuffer, isearch is still active and can be used to continue searching. Later this could be handled depending on a new option 'isearch-buffer-local':