Open wavexx opened 9 years ago
After looking at this a bit, I've found that isearch handles this in the 'pre-command-hook.
Thanks for reporting!
If phi-seach is active, instead of erroring, what about just switching to the minibuffer? This allows to continue the previous search.
On 04/08/2015 02:23 PM, zk-phi wrote:
we probably need to abort recursive edit instead of switching to the minibuffer recursively, but I wonder if just calling
(abort-recursive-edit)
is fine.
I was thinking more of:
(when phi-search--active (select-window (active-minibuffer-window)) (return-from ...)
so that it just switches to the minibuffer and the old search continues.
yes, I've just committed so please update phi-search
.
On 04/08/2015 02:45 PM, zk-phi wrote:
yes, I've just committed so please update
phi-search
.
Sorry I replied by mail and didn't see it.
Another way to break the modeline is to execute another read-from-minibuffer call :/ C-s, C-x o, M-x (for example).
I think read-from-minibuffer does a non-local exit in this case, which should be trapped with unwind-protect or condition-case.
Assuming C-s is bound to phi-search:
C-s ; start phi-search C-x o ; switch away C-s ; break the modeline
I noticed that I got the modeline stuck with phi-search, and today I finally was able to realize how I did it ;). Isearch has quite a complex logic to determine when aborting search since it supports recursive searches, but the most interesting seem:
(add-hook 'mouse-leave-buffer-hook 'isearch-done) (add-hook 'kbd-macro-termination-hook 'isearch-done)
I'm not sure if 'mouse-leave-buffer-hook is also run for C-x o?