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:56:38 +0200 Message-ID: References: <87ocfcj7r4.fsf@mail.jurta.org> <87631jvpzg.fsf@gmail.com> <4C18211C.3070106@harpegolden.net> <83typ2isns.fsf@gnu.org> <83mxuuicjc.fsf@gnu.org> <8339wkiheo.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 1276869430 7447 80.91.229.12 (18 Jun 2010 13:57:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Jun 2010 13:57:10 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, david@harpegolden.net To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 18 15:57: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 1OPc4A-00039S-Tu for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 15:57:07 +0200 Original-Received: from localhost ([127.0.0.1]:59314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPc4A-00084i-H2 for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 09:57:06 -0400 Original-Received: from [140.186.70.92] (port=37686 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPc44-00081r-Oh for emacs-devel@gnu.org; Fri, 18 Jun 2010 09:57:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPc43-0004Y6-HI for emacs-devel@gnu.org; Fri, 18 Jun 2010 09:57:00 -0400 Original-Received: from mail-gx0-f169.google.com ([209.85.161.169]:42719) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPc43-0004Xy-Cg; Fri, 18 Jun 2010 09:56:59 -0400 Original-Received: by gxk3 with SMTP id 3so650044gxk.0 for ; Fri, 18 Jun 2010 06:56:58 -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=7zXud8/caQbuWh7Mla0rRLQOXq1eKAhs+x4PsGZ5q/o=; b=Gq3ibzLKtOWcgklTqo5QT/KUI91djl6uzIjsOFgVJWHoToYdE/4JgKgR0r5hhkeULI RaPad+ffML52bUtmwvoWzpdnVIGsBLqNLyxIpmlp8vRLcCde6dwDzRU93neIGZhoMD6a RNnGYnd4wytbSzNPnhUpV3Ch3/fDfoepANbjo= 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=n0K/O8WKwEOmY5m3X8XAbbVyqAIiew+W4hgjibIyeXhZCwXir5TiLwuKvftbsCw3+e rD5X66cksbv5XBzb11ZNyINI7udr/kUD5VDHiwoH3GlK5yq6FWhhxAdhZs2zg2HbALg1 0/O1/LxXiLcdSZGz60k2K+OS3LewJWPvxyKDc= Original-Received: by 10.101.195.2 with SMTP id x2mr849267anp.211.1276869418439; Fri, 18 Jun 2010 06:56:58 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Fri, 18 Jun 2010 06:56:38 -0700 (PDT) In-Reply-To: <8339wkiheo.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:126159 Archived-At: On Fri, Jun 18, 2010 at 3:45 PM, Eli Zaretskii wrote: >> From: Lennart Borgman >> Date: Thu, 17 Jun 2010 06:55:17 +0200 >> Cc: Stefan Monnier , storm@cua.dk, emacs-devel= @gnu.org, >> =C2=A0 =C2=A0 =C2=A0 david@harpegolden.net >> >> > At least it works. I just tested. First time I am using Emacs without >> > "jumping scrolling"! :-) >> > >> > If you think this is the right way to fix it I will send patches later >> > when I cleaned up a bit. >> > >> > There is one more similar problem which I do not know how to handle, >> > in fileio.c. In the function Finsert_file_contents clip_changed is set >> > to 1. I am not quite sure of the impact of this but it looks wrong to >> > me to do this. I think the display engine should be told, but it must >> > decide what to do with redisplay, not fileio. >> >> Here is the patch (without the fileio.c part which I leave until I got >> some comments). > > This patch is not correct, IMO, because it does not consider the value > of the window's window_end_valid flag. =C2=A0The function > reconsider_clip_changes, which you try to side-step, does the same as > this test in your patch: > >> + =C2=A0if ((buffer->clip_begv !=3D buffer->begv) || (buffer->clip_zv != =3D buffer->zv)) >> + =C2=A0 =C2=A0buffer->clip_changed =3D 1; > > but it also considers the window_end_valid flag, without which your > patched version could try reusing portions of the current glyph matrix > when the matrix is not guaranteed to be up to date. I think you are wrong here, but I am not sure. What I have done in the patch is trying to avoid setting clip_changed whenever `narrow_to_region' or `widen' is called. I do this by comparing clipping the next time redisplay happens with the clipping that was in effect the last redisplay happened. Can you please explain why window_end_valid flag should be involved? Can you please also comment on the point where to check if clipping has changed? Is not the entry of redisplay_window the right point for this?