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: Thu, 17 Jun 2010 00:17:27 +0300 Message-ID: <83typ2isns.fsf@gnu.org> References: <87ocfcj7r4.fsf@mail.jurta.org> <87631jvpzg.fsf@gmail.com> <4C18211C.3070106@harpegolden.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1276723689 32148 80.91.229.12 (16 Jun 2010 21:28:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 Jun 2010 21:28:09 +0000 (UTC) Cc: storm@cua.dk, emacs-devel@gnu.org, david@harpegolden.net To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 16 23:28:07 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 1OP09T-00081W-Bg for ged-emacs-devel@m.gmane.org; Wed, 16 Jun 2010 23:28:03 +0200 Original-Received: from localhost ([127.0.0.1]:37642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OP03c-0003zz-JB for ged-emacs-devel@m.gmane.org; Wed, 16 Jun 2010 17:22:00 -0400 Original-Received: from [140.186.70.92] (port=58296 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOzzY-00015R-Pe for emacs-devel@gnu.org; Wed, 16 Jun 2010 17:17:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOzzX-0000kT-M3 for emacs-devel@gnu.org; Wed, 16 Jun 2010 17:17:48 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:60517) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOzzX-0000k6-Fj for emacs-devel@gnu.org; Wed, 16 Jun 2010 17:17:47 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L4400A00LM20F00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Thu, 17 Jun 2010 00:17:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.88.125]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L4400134LSYSIK0@a-mtaout20.012.net.il>; Thu, 17 Jun 2010 00:17:26 +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:126037 Archived-At: > From: Lennart Borgman > Date: Wed, 16 Jun 2010 03:40:11 +0200 > Cc: emacs-devel@gnu.org > > I wonder if this happens in redisplay_window in xdisp.c. This > functions has a labeled called "recenter": > > /* Finally, just choose place to start which centers point */ > > recenter: > if (centering_position < 0) > centering_position = window_box_height (w) / 2; > > The intent of that label seems to be just trying to came up to speed > with the input. No, it's not just to keep up. Recentering is the generic redisplay method, used as the last resort if Emacs is unable to be smarter than that. > However I dislike the way the problem is solved. I would rather wish > that the display engine instead calculated a new window start point > from the input command queue. I have no idea if that is actually > possible. I think it's impossible. How can you guess the effect of list of arbitrary input events on the display, without actually redisplaying? > What I can see is that redisplay_window can restart through > redisplay_internal (the comment at the label "need_larger_matrices" > says that). need_larger_matrices means that the dimensions of the window changed drastically, e.g. if the text uses smaller fonts. In that case, the current redisplay cycle is aborted, and Emacs reallocates the glyph matrices to fit the new dimensions. > Perhaps this possibility to restart can be used instead. You will end up with the same recenter anyway, after redisplay is re-entered.