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: Sat, 19 Jun 2010 02:18:13 +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> <83aaqsiyb6.fsf@gnu.org> <83zkysh2hb.fsf@gnu.org> <83vd9gh0s6.fsf@gnu.org> <83typ0gzgh.fsf@gnu.org> <83pqzogxpf.fsf@gnu.org> <83ljacgo8r.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 1276906725 18164 80.91.229.12 (19 Jun 2010 00:18:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Jun 2010 00:18:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 19 02:18:43 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 1OPlli-0006mc-46 for ged-emacs-devel@m.gmane.org; Sat, 19 Jun 2010 02:18:42 +0200 Original-Received: from localhost ([127.0.0.1]:43076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPllh-0007tk-Bp for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 20:18:41 -0400 Original-Received: from [140.186.70.92] (port=35555 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPllb-0007tV-J5 for emacs-devel@gnu.org; Fri, 18 Jun 2010 20:18:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPlla-0007bS-IO for emacs-devel@gnu.org; Fri, 18 Jun 2010 20:18:35 -0400 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:58877) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPlla-0007bM-F5; Fri, 18 Jun 2010 20:18:34 -0400 Original-Received: by yxf34 with SMTP id 34so293843yxf.0 for ; Fri, 18 Jun 2010 17:18:33 -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=i2iScNp/eRt+D4pRyZVM3B7GDEfJcVp2ojHrZSFHGeI=; b=j+sV/wyRcWX4hAebhSkcBf1KqYV5ejoPT9VqxFMleNC+2Jo+sfIBaAZ1IqH1RNjDfT lrt/zSVExsMJJcW6h3wrxWp67GPnCwqzEv/s0shrKKDxvEC8cfmIJhJ+jkytgg1+Zt1V 7FNvbxeF04wMDAbAwqdkVMr1p9HZy8Whhhjeg= 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=w22+8pnoT2kytFVUXzz2s3sZXvWftyFG2Z7FI4gNWejZrWHISbQ3LKclvwqvQTKjqr prIDaTmGaABJD4v4rnaqH5TkvG6cTftKjm+/GekP+Q6WhySMwM87Qk8DUcX813Wwcb0Y Lm6LIRCue9NTVVOePcR/sz0qbAInQtnwddiWk= Original-Received: by 10.101.133.33 with SMTP id k33mr1501046ann.145.1276906713196; Fri, 18 Jun 2010 17:18:33 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Fri, 18 Jun 2010 17:18:13 -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:126199 Archived-At: On Fri, Jun 18, 2010 at 11:25 PM, Lennart Borgman wrote: > On Fri, Jun 18, 2010 at 9:00 PM, Eli Zaretskii wrote: >>> From: Lennart Borgman >>> Date: Fri, 18 Jun 2010 19:31:30 +0200 >>> Cc: emacs-devel@gnu.org >>> >>> + =C2=A0if ((w->current_matrix->begv !=3D b->begv) || (w->current_matri= x->zv !=3D b->zv)) >>> + =C2=A0 =C2=A0b->clip_changed =3D 1; >> >> You cannot safely use w->current_matrix if w->window_end_valid is nil. > > > So you say that w->current_matrix->begv is not valid unless > window_end_valid is non-nil. > > All the above test does is comparing the current clipping with that > recorded in w->current_matrix->begv/zv. In that case we must set > clip_changed to 1. > > Are you saying that w->current_matrix->begv/zv is set before the > redisplay is finished? (I do not have the code here so I can not check > at the moment.) I just checked the code. w->current_matrix->begv/zv is only set in mark_window_display_accurate_1 (w, accurate_p) That means that it has the value needed to set clip_changed as I suggested. (So your first claim that w already had the necessary information seems correct, i.e. with my patch, and the second is false. Not that I care, but for clearness.) I can't think of any reason that it would be terribly bad to set clip_changed to 1 when the clipping has changed since last redisplay. So I do not think there is any danger with my patch. However I can think of reasons that it is not needed. If the clipping change is outside w->current_matrix->begv/zv then obviously then I believe the displayed region can't be influenced. Can anyone see any way it could be influenced? > If you are saying that then what you are saying above seems correct to > me. But on the other hand then I think what you said before about that > the redisplay engine had enough information for setting clip_changed > is false. > > Can you explain more exactly how you are thinking? > > >> And if you add that test, you will end up with exactly the same code >> that was there originally. >> >> IOW, we still need to find out why reconsider_clip_changes fails to >> reset the clip_changed flag. I think I have explained that several times. narrow_to_region etc sets clip_changed to 1 without ever caring about the state redisplay is in. I could go into more details, but is that necessary?