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 00:16:33 +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> 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 1276813029 2557 80.91.229.12 (17 Jun 2010 22:17:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Jun 2010 22:17:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 18 00:17:08 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 1OPNOS-0006HH-Uy for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 00:17:05 +0200 Original-Received: from localhost ([127.0.0.1]:51554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPNOS-0001yf-2A for ged-emacs-devel@m.gmane.org; Thu, 17 Jun 2010 18:17:04 -0400 Original-Received: from [140.186.70.92] (port=59848 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPNOK-0001x1-06 for emacs-devel@gnu.org; Thu, 17 Jun 2010 18:16:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPNOI-0008G8-RR for emacs-devel@gnu.org; Thu, 17 Jun 2010 18:16:55 -0400 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:43125) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPNOI-0008G1-OE; Thu, 17 Jun 2010 18:16:54 -0400 Original-Received: by gwj23 with SMTP id 23so287796gwj.0 for ; Thu, 17 Jun 2010 15:16:53 -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=h3LntiUnaFpWhJf4aeLv6KI7Cq/WAkptNUQuQB2ukmo=; b=NE+/NOpcG/4CYoCt7O9krf1HoiqGoyyjCnyArfzCWQHAAkjtVKqTqn47EfaaSBsCWm djFCevzkbJEXYLiH7yCCpVbk0mw8jXFCIIMoemo/q57l5bN/JJ5jTUx3ucLnWN69+WRv y6uh8x95mFb129+xvRH4wHpF+es3VnmF700/g= 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=Del0VgopZdFmxK0Dgjk5+QIioBwYwzESpu8dBLOzekICM1qDj3BiL5ZdZDic/VedTr 987dEB4F/9IwISUZ/4WGBF5tqChv67szbnTMs/8fPcR632BViEB+Wi0qy5u2UJn7htYX cuydJ6hzzh+2VhkyuFnI2kDDMwMIuWzkQklOo= Original-Received: by 10.100.244.38 with SMTP id r38mr177930anh.29.1276813013227; Thu, 17 Jun 2010 15:16:53 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Thu, 17 Jun 2010 15:16:33 -0700 (PDT) In-Reply-To: <83fx0lihov.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:126106 Archived-At: On Thu, Jun 17, 2010 at 9:26 PM, Eli Zaretskii wrote: >> From: Lennart Borgman >> Date: Thu, 17 Jun 2010 21:14:04 +0200 >> Cc: emacs-devel@gnu.org >> >> > =C2=A0if (b->clip_changed >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 && !NILP (w->window_end_valid) >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 && w->current_matrix->buffer =3D=3D= b >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 && w->current_matrix->zv =3D=3D BUF= _ZV (b) >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 && w->current_matrix->begv =3D=3D B= UF_BEGV (b)) >> > =C2=A0 =C2=A0b->clip_changed =3D 0; >> > >> > So, if b->clip_changed is non-zero at entry to reconsider_clip_changes= , >> > and w->window_end_valid is non-nil, as you say, this code should have >> > reset b->clip_changed to zero. =C2=A0And yet you say it didn't. =C2=A0= Why not? >> > what prevented it from doing so? >> >> I thought so first too, but please see the message I just sent with an >> explanation of the patches I sent. > > Sorry, that doesn't explain it to me, because narrowing is not part of > the recipe at all. > > Again, PLEASE answer my questions, if you really want my help in > understanding this issue. =C2=A0What parts of the above condition prevent= ed > reconsider_clip_changes from resetting b->clip_changed to zero? =C2=A0If > needed, please re-run under GDB (without your patches) and see what > other factors are at work here. I can now answer you question again since I have found a new way to make "jumping scrolling" appear. However the situation above is not involved, at least not directly, since ->clip_changed is 0. (I think there is an unused global variable clip_changed that is not used.) The situation is now this: - I am using my patch (in the state I sent it here). - I have seen no problem with the patch (but as I said I think there is one problem though it has not shown up). - It is quite hard to make Emacs do the "jumping scrolling". So it is better, still there are problems. - It is possible to still get Emacs to do the "jumping scrolling". - To do that I narrow the buffer to 45 c, turn on visual-line mode and add a wrap-prefix on the line. - Then if I just hold down the down arrow it can happen after a while. - My output shows that it is because try_scrolling failed. Some variables as I see them now at the recenter: label in redisplay_window= : scroll_step =3D=3D 1 temp_scroll_step =3D=3D 0 current_buffer->clip_changed =3D=3D0 Why current_buffer, there is a variable buffer here? current_buffer->scroll_up_aggressively =3D=3D 45459482, same down BTW, the use of current_buffer here seems to me to be a bug. And it is because clip_changed is 0 that try_scrolling is tested, see the output here from the DebPrint below and some statement later: redisplay_window b try_scr, clip_changed=3D0, >=3D BEGV: 1, <=3D ZV: 1, jtop=3D1, llmf=3D0 try_scrolling SCROLLING_FAILED clear_glyph <---------------- This seem to be the reason why try_scrolling failed. redisplay_window.SCROLLING_FAILED (This is the return value from try_scrolling) redisplay_window.recenter centering_position=3D-1 (This is at the "recenter:" label) DebPrint (("redisplay_window b try_scr, clip_changed=3D%d, >=3D BEGV: %d, <=3D ZV: %d, jtop=3D%d, llmf=3D%d", current_buffer->clip_changed, CHARPOS (startp) >=3D BEGV, CHARPOS (startp) <=3D ZV, just_this_one_p, last_line_misfit )); The line in the buffer it stopped at is wrapped once and is indented. I guess an interesting part may be why clear_glyph_matrix failed. Do you think there is something interesting there?