From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: The unwarranted scrolling assumption Date: Fri, 18 Jun 2010 10:58:04 +0300 Message-ID: <837hlwixgz.fsf@gnu.org> References: <87ocfcj7r4.fsf@mail.jurta.org> <87631jvpzg.fsf@gmail.com> <4C18211C.3070106@harpegolden.net> <87vd9j5neu.fsf@kfs-lx.rd.rdm> <83sk4misf2.fsf@gnu.org> <83iq5hiiin.fsf@gnu.org> <83fx0lihov.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1276848565 27496 80.91.229.12 (18 Jun 2010 08:09:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Jun 2010 08:09:25 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, storm@cua.dk To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 18 10:09:21 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OPWdb-0006bi-Nz for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 10:09:20 +0200 Original-Received: from localhost ([127.0.0.1]:42355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPWWS-000387-Sy for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 04:01:56 -0400 Original-Received: from [140.186.70.92] (port=53755 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPWSg-00009O-KF for emacs-devel@gnu.org; Fri, 18 Jun 2010 03:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPWSe-0002av-Si for emacs-devel@gnu.org; Fri, 18 Jun 2010 03:58:02 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:52636) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPWSe-0002ab-LW for emacs-devel@gnu.org; Fri, 18 Jun 2010 03:58:00 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L4700K00A1PPX00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Fri, 18 Jun 2010 10:57:59 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.88.125]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L4700HJ3A4L28A0@a-mtaout22.012.net.il>; Fri, 18 Jun 2010 10:57:59 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126134 Archived-At: > From: Lennart Borgman > Date: Fri, 18 Jun 2010 01:49:52 +0200 > Cc: emacs-devel@gnu.org >=20 > > Eh, sorry, my confusion. It is not clear_glyph_matrix that failed= , of > > course. I just meant the reason we came to that line in try_scrol= ling. > > What lead to the condition > > > > =C2=A0w->cursor.vpos < 0 > > > > BTW, looking at the code there are a couple of places where > > w->cursor.vpos is set to -1. I guess the tests are just for if it= is < > > 0. Wouldn't it be better to set different negative values so it w= ould > > be easier to see where it failed? (That is normal error tracing.) >=20 > I notice now that this is clearly a separate issue, not related to > speed. It is another bug. As I tried to explain, this is not a bug, but expected behavior, at least in general: when scrolling fails to bring point into the window= , the try_scrolling optimization fails, and other methods are tried instead. > Recentering happens whenever you are at the bottom of the screen if > some conditions are met. I can reproduce it with this: >=20 > - Open window.c > - Goto line 702: >=20 > =09=09=09 + WINDOW_HEADER_LINE_HEIGHT (w)), >=20 > - Turn on wrap-to-fill-column-mode. Turn it off again. > - Turn on visual-line-mode > - I have (window-width) =3D 55, height 34. > - Position to W in WINDOW (it is on a wrapped line) > - Use C-L to get this to the bottom. > - Press down arrow. >=20 > (Note: wrap-to-fill-column-mode justs adds add wrap-prefix here. Wh= ich > is for some reason does not remove. Bug ;-( -- > wrap-to-fill-column-mode is of course part of nXhtml, but probably = you > can just add a fill prefix on the whole line that is equal to what = the > line indentation have.) >=20 > For me this recenters. And try_scrolling fails where I said before, > around line 13581: >=20 > /* Display the window. Give up if new fonts are loaded, or if po= int > doesn't appear. */ > if (!try_window (window, startp, 0)) > rc =3D SCROLLING_NEED_LARGER_MATRICES; > else if (w->cursor.vpos < 0) > { > clear_glyph_matrix (w->desired_matrix); > DebPrint (("try_scrolling SCROLLING_FAILED clear_glyph")); > rc =3D SCROLLING_FAILED; > } Again, this is normal. You cannot prevent recentering from kicking i= n in some cases.