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: Thu, 17 Jun 2010 05:59:12 +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> 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 1276747200 26470 80.91.229.12 (17 Jun 2010 04:00:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Jun 2010 04:00:00 +0000 (UTC) Cc: david@harpegolden.net, emacs-devel@gnu.org, Stefan Monnier , storm@cua.dk To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 17 05:59:58 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 1OP6Gj-0002N6-LS for ged-emacs-devel@m.gmane.org; Thu, 17 Jun 2010 05:59:57 +0200 Original-Received: from localhost ([127.0.0.1]:53111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OP6Gj-0000ng-Cr for ged-emacs-devel@m.gmane.org; Wed, 16 Jun 2010 23:59:57 -0400 Original-Received: from [140.186.70.92] (port=57069 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OP6GM-0000a6-RS for emacs-devel@gnu.org; Wed, 16 Jun 2010 23:59:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OP6GL-00083Y-7l for emacs-devel@gnu.org; Wed, 16 Jun 2010 23:59:34 -0400 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:40760) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OP6GL-00083M-3M; Wed, 16 Jun 2010 23:59:33 -0400 Original-Received: by yxf34 with SMTP id 34so1728452yxf.0 for ; Wed, 16 Jun 2010 20:59:32 -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=eh3awKApDu77XbpHYUn7fbgk3m3FI9tYxUZaHbSX52s=; b=YjqAF7CKIS79pylr6rMF9AHQHfCIdCEXnZukjqwVSk7T28arzBbd0TIh1tOf7peyxL hRZTFU2u1gDs1upjBz6pdntvP8kNLcqbNAQGMSdcU2fRjs10qms6AzE49UhVtEhKSofy ZvwviYc1GNrKlktlLNJt0Wd6NfYzz9G9dZIY8= 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=Cej1CMkqJ4UdIxY8OLJZ7hd54DGa3itEtNJjSZWq9rJ/1xwlHFl5Vn35H1gQdCa2sX eqr77ha86T7evi5ao4qlA0vxwOnQvHIJjFw5uLTKOFyEHSTCyNXgSm2+FJNiJAXn45QO vUwpUaWH5ZU7+DkZU+7NAEAQaXlIk0UBWIa/w= Original-Received: by 10.101.5.18 with SMTP id h18mr8174134ani.120.1276747172181; Wed, 16 Jun 2010 20:59:32 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Wed, 16 Jun 2010 20:59:12 -0700 (PDT) In-Reply-To: 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:126055 Archived-At: On Thu, Jun 17, 2010 at 5:10 AM, Lennart Borgman wrote: > On Thu, Jun 17, 2010 at 5:05 AM, Eli Zaretskii wrote: >>> From: Stefan Monnier >>> Cc: Lennart Borgman , =C2=A0storm@cua.dk, = =C2=A0emacs-devel@gnu.org, =C2=A0david@harpegolden.net >>> Date: Wed, 16 Jun 2010 20:54:52 -0400 >>> >>> Indeed what he suggests is probably impossible. =C2=A0But the end resul= t he's >>> after is definitely possible: move the window-start as little as possib= le >>> (tho still, line by line) to keep point displayed. >> >> xdisp.c already tries to do that, we just need to find out why it >> fails in this particular case. > > After trying to restore the clip_changed value when save-restriction, > widen etc unnecessarily changed I suddenly wonder why they changed it. > Is not this something that only redisplay should handle? redisplay_can > easily save the clipping when it sets clip_changed to 0 and compare > with that when it enters redisplay_window and set clip_changed to 1 if > the saved clipping does not match. > > Does that sound reasonable? (I do not know if I am missing something.) 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.