From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: The unwarranted scrolling assumption Date: Fri, 18 Jun 2010 17:29:29 +0300 Message-ID: <83vd9gh0s6.fsf@gnu.org> 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> Reply-To: Eli Zaretskii 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 1276871558 16403 80.91.229.12 (18 Jun 2010 14:32:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Jun 2010 14:32:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 18 16:32:34 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 1OPccU-0006TM-EQ for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 16:32:34 +0200 Original-Received: from localhost ([127.0.0.1]:60502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPccT-0004hJ-7d for ged-emacs-devel@m.gmane.org; Fri, 18 Jun 2010 10:32:33 -0400 Original-Received: from [140.186.70.92] (port=59286 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPccF-0004b0-JD for emacs-devel@gnu.org; Fri, 18 Jun 2010 10:32:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPcZy-0001iF-MM for emacs-devel@gnu.org; Fri, 18 Jun 2010 10:29:59 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:43479) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPcZy-0001i0-DN for emacs-devel@gnu.org; Fri, 18 Jun 2010 10:29:58 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L4700B00S4CXH00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Fri, 18 Jun 2010 17:29:46 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.88.125]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L47006S5S9LDHE0@a-mtaout22.012.net.il>; Fri, 18 Jun 2010 17:29:46 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:126163 Archived-At: > From: Lennart Borgman > Date: Fri, 18 Jun 2010 16:07:17 +0200 > Cc: emacs-devel@gnu.org >=20 > On Fri, Jun 18, 2010 at 3:52 PM, Eli Zaretskii wrote= : > >> From: Lennart Borgman > >> Date: Fri, 18 Jun 2010 15:30:37 +0200 > >> Cc: emacs-devel@gnu.org > >> > >> >> It is !NILP (w->window_end_valid). > >> > > >> > ??? How can this be? =C2=A0The code says: > >> > >> A misunderstanding, sorry. I meant that in this case that line/c= ode > >> gave the value 0. > >> > >> > =C2=A0if (b->clip_changed > >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 && !NILP (w->window_end_val= id) > >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 && w->current_matrix->buffe= r =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 BUF_BEGV (b)) > >> > =C2=A0 =C2=A0b->clip_changed =3D 0; > > > > So what is the value of w->window_end_valid when you enter > > reconsider_clip_changes? =C2=A0Is it nil? >=20 > This is the what I used to get the output I sent: >=20 > if (b->clip_changed) > DebPrint (("+++reconsider: end_valid=3D%d, b=3D%d, ZV=3D%d, BEG= V=3D%d", > !NILP (w->window_end_valid), > w->current_matrix->buffer =3D=3D b, > w->current_matrix->zv =3D=3D BUF_ZV (b), > w->current_matrix->begv =3D=3D BUF_BEGV (b))); And what was the output? I don't see it in this thread. > The problem is how clip_changed is handled by narrow_to_region etc. > That is what my patch is about. I think your patch is wrong. I think the current code handles the case you are trying to "fix" just fine. It tried to recenter for som= e reason, and I'm trying to find out what that reason was. I'm guessin= g that the reason was the window_end_valid flag was nil. If you confir= m that, we could then start looking for why that flag was nil. Reusing the current matrix when that flag is nil is unsafe. > As I have said several times I think the problem is that clip_chang= ed > is set by narrow_to_region etc. Please look into this first. I already did, and I think that code is correct. Obviously, clip_changed needs to be set whenever the narrowing changes.