bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#10105: 24.0.91; Possible bug in `scroll-conservatively'


From: Eli Zaretskii
Subject: bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
Date: Mon, 28 Nov 2011 08:08:14 -0500

> Date: Mon, 28 Nov 2011 13:12:48 +0100
> From: Dani Moncayo <dmoncayo@gmail.com>
> Cc: 10105@debbugs.gnu.org
> 
> > Why did you expect it to be at the bottom?
> 
> Because, after the "failing" C-s, the Isearch begins again from the
> top of the buffer, so that the search direction is always (at least
> conceptually) from top to bottom, i.e. _fordward_.

The _search_ direction is forward, that's true.  But
scroll-conservatively is not about the search direction, it is about
the direction in which point moves in the buffer from its last
displayed location.  And that is _backward_, not forward.

> See info node "(emacs)Repeat Isearch".

I will see your manual reference and raise ya.  From info node
"(emacs)Auto Scrolling", pay attention to the last sentence:

   Emacs performs "automatic scrolling" when point moves out of the
   visible portion of the text.

     Normally, this centers point vertically within the window.
   However, if you set `scroll-conservatively' to a small number N,
   then if you move point just a little off the screen (less than N
   lines), Emacs scrolls the text just far enough to bring point back
   on screen.  By default, `scroll-conservatively' is 0.  If you set
   `scroll-conservatively' to a large number (larger than 100), Emacs
   will never center point as result of scrolling, even if point moves
   far away from the text previously displayed in the window.  With
   such a large value, Emacs will always scroll text just enough for
   bringing point into view, so point will end up at the top or bottom
   of the window, depending on the scroll direction.

It talks about the direction in which point moves wrt the window, not
the direction of search.

Anyway, this is not something the display engine can fix.  If we want
point at the window bottom in this case, Isearch should arrange for
that to happen.  The display engine does not know anything about
Isearch and wrap-around, all it has is the previous window start point
and the new location of point in the buffer.  E.g., try "M-x goto-char" 
and you will see that point ends up at the top or bottom line
depending on the direction you move it.

So if you still want to have the behavior changed, please file a
separate bug against Isearch.





reply via email to

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