emacs-devel
[Top][All Lists]
Advanced

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

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


From: Alan Mackenzie
Subject: Re: bug#17453: Isearch doesn't work properly with Follow Mode.
Date: Sun, 1 Nov 2015 20:15:35 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Artur.

On Sun, Nov 01, 2015 at 07:46:12PM +0000, Artur Malabarba wrote:
> >> How is this "not having isearch know about Follow mode"?  I see that
> >> knowledge on every step of this patch, whenever you call the new
> >> functions.
> >
> > It has no knowledge of the internals of Follow Mode.  window*-start is
> > merely an abstract interface, currently with two implementations
> > associated with it, a default one for normal windows and a Follow Mode
> > one. [...]
> > I'm not sure I really understand your question.  At several points in
> > isearch, functions need to be called which eventually end up calling
> > Follow Mode functions.

> This is not about the window*- functions.

> There are several places where your patch checks whether follow-mode
> is on, turns it off, or turns it back on. I think this is still too
> attached to follow mode.
> Isearch really shouldn't worry about disabling or enabling other libraries.

Have a look more closely at that point.  It is where an old (possibly
obsolete) facility of the "small window" is used.  The idea is that if
a terminal's comms line is very slow, isearch will just display a single
line of text instead of scrolling an entire large window.

However, if Follow Mode is enabled, it would completely negate the point
of the "small window" since it would scroll all the other windows
displaying the buffer anyway.

Now, it's highly unlikely anybody on a 1200 Baud terminal is going to be
using Follow Mode anyway, but if they are, they'll still get the benefit
of the "small window".

Set your `baud-rate' to 100, and try this facility out!

> The idiomatic Emacs way to do this is to add hooks to isearch, and run
> them at useful places. Then packages like follow-mode can add stuff to
> these hooks and do what they want (like, enable/disable itself).

But the "small window" facility is hard coded, and probably has been for
30 years.  Just up until now, nobody even considered the interaction
between "small window" and Follow Mode.

Still, this part of my patch is hardly essential to the main thrust.  So
if people really think it inappropriate, I can just take this bit out.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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