From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10105: 24.0.91; Possible bug in `scroll-conservatively' Date: Mon, 28 Nov 2011 08:08:14 -0500 Message-ID: References: <83mxbk8mhn.fsf@gnu.org> <83d3cg8aww.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1322485769 9315 80.91.229.12 (28 Nov 2011 13:09:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2011 13:09:29 +0000 (UTC) Cc: 10105@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 28 14:09:25 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RV0xV-0004p5-IS for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Nov 2011 14:09:21 +0100 Original-Received: from localhost ([::1]:46643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV0xU-0000GI-SN for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Nov 2011 08:09:20 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV0xO-0000G1-C5 for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2011 08:09:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RV0xI-0004FY-Dv for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2011 08:09:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV0xI-0004FU-CL for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2011 08:09:08 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RV0z8-0001xi-BW for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2011 08:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Nov 2011 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10105 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10105-submit@debbugs.gnu.org id=B10105.13224858117482 (code B ref 10105); Mon, 28 Nov 2011 13:11:02 +0000 Original-Received: (at 10105) by debbugs.gnu.org; 28 Nov 2011 13:10:11 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RV0yJ-0001wd-5B for submit@debbugs.gnu.org; Mon, 28 Nov 2011 08:10:11 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RV0yH-0001wW-Db for 10105@debbugs.gnu.org; Mon, 28 Nov 2011 08:10:09 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RV0wQ-00060G-Qx; Mon, 28 Nov 2011 08:08:14 -0500 In-reply-to: (message from Dani Moncayo on Mon, 28 Nov 2011 13:12:48 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 28 Nov 2011 08:11:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:54356 Archived-At: > Date: Mon, 28 Nov 2011 13:12:48 +0100 > From: Dani Moncayo > 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.