Subject: Re: bug#17453: Isearch doesn't work properly with Follow Mode.

From: Alan Mackenzie <[email-masked]>
Date: Tue, 3 Nov 2015 22:11:31 +0000

Hello, Arturn.

On Tue, Nov 03, 2015 at 04:18:45PM +0000, Artur Malabarba wrote:
> 2015-11-03 15:49 GMT+00:00 Eli Zaretskii <[email-masked]>:
> >> This is complicated.  Ideally, the Follow Mode windows should be
> >> synchronised in FM's post-command-hook, not isearch's.  It is not
> >> isearch's job to realign windows.  follow-post-command-hook both realigns
> >> windows and choses an appropriate window to put point in.  We should let
> >> it.

> > Once again, if some code in Isearch calls the same function that is
> > used in follow-post-command-hook, the above is not an issue.
> > Moreover, saving some calls to the hook will make Emacs more
> > responsive.

> I agree with Eli and Juri on this. If there's a solution as simple as
> calling a follow-mode function in isearch-post-update-hook, then this
> sounds like a no-downside solution.

I'm wondering if we're still talking about the same problem.  ;-)  A
simpler solution is _not_ to call a FM function from that Isearch hook.
Unless we're talking at cross purposes, there is simply no need.  As
long as the Isearch command is allowed to go to completion without
forcibly redisplaying, FM will re-synchronise the windows (if needed)
and select an appropriate window for point, all on its own (in
follow-post-command-hook).

> Of course it's not isearch's job to realign windows, but that's why
> the hook exists: so that other packages can run their own functions
> and do their own jobs at that point in time.

Good night, and sleep well!

-- 
Alan Mackenzie (Nuremberg, Germany).