Subject: bug#925: 23.0.60; follow-mode doesn't work in buffers with a header line

From: martin rudalics <[email-masked]>
Date: Thu, 11 Sep 2008 10:54:58 +0200

> No, it doesn't. When I do that, not only does the expected behavior
 > not happen, point moves back to the center of the first screen. This
 > didn't happen with the default value of scroll-conservatively.

I don't understand well.  When I set `scroll-conservatively' to 100
there's no recentering with emacs -Q and both windows scroll.  There's,
however, at least one line missing as you remark below.

 > Here's what I now think is going on:
 >
 > When there's a header line, follow-mode miscomputes the beginning of
 > the second window-- if you try out the "steps to reproduce", you can
 > see that there's one line after the end of the first window which is
 > not visible in the second window. When you try to C-n to that line,
 > follow-mode can't display that line in either window, so something
 > weird happens.
 >
 > I tried the (flawed) patch below, which decreases the effective
 > window-height when there's a header line. I'm not sure if this is the
 > right approach.

Ideally, the second window wouldn't display the header line at all.

 > With this patch, point correctly moves from one window to the other,
 > and the two windows display consecutive lines, as expected. However,
 > sometimes when moving point between windows, the text will shift up or
 > down by a line. I don't know why that happens.

This seems to already happen without your patch.

martin