emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [WIP PATCH] Controlling Isearch from the minibuffer


From: Juri Linkov
Subject: Re: [WIP PATCH] Controlling Isearch from the minibuffer
Date: Sun, 09 May 2021 22:05:08 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> - Does the approach taken here seem sufficiently robust?  Note in
>   particular the `with-isearch-window' macro, which is now needed around
>   several functions,

You can avoid the with-isearch-window macro by checking
in isearch-pre-command-hook if the current buffer is the minibuffer,
then switch to the original buffer, and let the isearch command to
do what it normally does, then switch back to the minibuffer
in isearch-post-command-hook.

>   as well as the somewhat hacky `run-with-idle-timer'
>   call inside the `isearch-mode' function.

You can avoid the timer hack by adding a guard to
isearch-post-command-hook: when at the end of the isearch command,
point is not in the minibuffer, activate the minibuffer
(assuming that isearch-from-minibuffer is t).

> - Are the slightly backwards incompatible keybinding changes in
>   `isearch-edit-string' acceptable?

Only when isearch-from-minibuffer is t.

> - I don't like the `with-isearch-window-quitting-edit' macro, but I
>   don't see a different way of achieving the necessary effect.

The with-isearch-window-quitting-edit macro can be avoided the same way
as the with-isearch-window macro.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]