From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: The unwarranted scrolling assumption Date: Fri, 18 Jun 2010 15:48:32 +0200 Message-ID: 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> <837hlwixgz.fsf@gnu.org> 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 1276869290 6908 80.91.229.12 (18 Jun 2010 13:54:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Jun 2010 13:54:50 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, storm@cua.dk To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 18 15:54:45 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 1OPc1r-00022d-HT for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 15:54:43 +0200 Original-Received: from localhost ([127.0.0.1]:39692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPc1q-0005C9-T9 for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 09:54:42 -0400 Original-Received: from [140.186.70.92] (port=60390 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPc1h-00059I-Gf for emacs-devel@gnu.org; Fri, 18 Jun 2010 09:54:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPc1f-00048W-RE for emacs-devel@gnu.org; Fri, 18 Jun 2010 09:54:33 -0400 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:35629) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPc1f-00048P-Ou; Fri, 18 Jun 2010 09:54:31 -0400 Original-Received: by yxf34 with SMTP id 34so156217yxf.0 for ; Fri, 18 Jun 2010 06:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=kttmgE2bisHsvWlDBIioKrcEMqPYErxubAelJklWRLA=; b=QJDYnp3XehQEvgdvfNI3me4l8YYofXlAfFFzQL35+KJMJZ8p9Txze2QBdUonP/qCPN DKaqB4vKVKKh++A22o4RyABfACJR5lCZlFCy2UNKoxti+oElu7GcjxTFl44zPKhlRKEy qQXRhWnvB2Zz3Dq9Sv+J9moSgI9mMQ0HJ0jhg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=dkL9PiQV3aZ43xtJRMKyDsDI9yUmVmRtozmS8lJC9resf2mudjn3nZJ6z+bDHK1Si5 9SyxWzehP1EJus+f+yVhjGkiIeyAQLmTotJScU3LI+uimu6v6xBRXR18Un1ers6ByTmc R5IfAVf2JURHR5JeU8q50xnKn+dQebwZ8UapM= Original-Received: by 10.101.4.15 with SMTP id g15mr900191ani.149.1276868932185; Fri, 18 Jun 2010 06:48:52 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Fri, 18 Jun 2010 06:48:32 -0700 (PDT) In-Reply-To: <837hlwixgz.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:126158 Archived-At: On Fri, Jun 18, 2010 at 9:58 AM, Eli Zaretskii wrote: >> From: Lennart Borgman >> Date: Fri, 18 Jun 2010 01:49:52 +0200 >> Cc: emacs-devel@gnu.org >> >> > 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_scrolling. >> > 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 would >> > be easier to see where it failed? (That is normal error tracing.) >> >> 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. I know but in this case it looks like a clear bug. >> Recentering happens whenever you are at the bottom of the screen if >> some conditions are met. I can reproduce it with this: >> >> - Open window.c >> - Goto line 702: >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0+ WINDOW_HEADER_LINE_HEIGHT (w)), >> >> - 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. >> >> (Note: wrap-to-fill-column-mode justs adds add wrap-prefix here. Which >> is for some reason does not remove. Bug ;-( -- >> wrap--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.) >> >> For me this recenters. And try_scrolling fails where I said before, >> around line 13581: >> >> =C2=A0 /* Display the window. =C2=A0Give up if new fonts are loaded, or = if point >> =C2=A0 =C2=A0 =C2=A0doesn't appear. =C2=A0*/ >> =C2=A0 if (!try_window (window, startp, 0)) >> =C2=A0 =C2=A0 rc =3D SCROLLING_NEED_LARGER_MATRICES; >> =C2=A0 else if (w->cursor.vpos < 0) >> =C2=A0 =C2=A0 { >> =C2=A0 =C2=A0 =C2=A0 clear_glyph_matrix (w->desired_matrix); >> =C2=A0 =C2=A0 =C2=A0 DebPrint (("try_scrolling SCROLLING_FAILED clear_gl= yph")); >> =C2=A0 =C2=A0 =C2=A0 rc =3D SCROLLING_FAILED; >> =C2=A0 =C2=A0 } > > Again, this is normal. =C2=A0You cannot prevent recentering from kicking = in > in some cases. I do not think so. I see several small bugs around this. Please see the later messages I sent for this example. (Point jumps etc. It is not only scrolling.)