From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Unfreezing the display during auto-repeated scrolling. Date: Mon, 27 Oct 2014 10:05:26 +0000 Message-ID: <20141027100526.GB2771@acm.acm> References: <83zjcpa11g.fsf@gnu.org> <20141021171403.GB3035@acm.acm> <83oat59ucc.fsf@gnu.org> <20141021183807.GD3035@acm.acm> <20141026124333.GA4397@acm.acm> <83h9yq4w5g.fsf@gnu.org> <20141026200313.GE4397@acm.acm> <20141026221530.GF4397@acm.acm> <8361f6420v.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1414404407 15043 80.91.229.3 (27 Oct 2014 10:06:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Oct 2014 10:06:47 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 27 11:06:41 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XihCC-0008Gm-O7 for ged-emacs-devel@m.gmane.org; Mon, 27 Oct 2014 11:06:41 +0100 Original-Received: from localhost ([::1]:60458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XihCC-0008VI-8x for ged-emacs-devel@m.gmane.org; Mon, 27 Oct 2014 06:06:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XihBt-0008Uz-2X for emacs-devel@gnu.org; Mon, 27 Oct 2014 06:06:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XihBf-0003Xi-Vv for emacs-devel@gnu.org; Mon, 27 Oct 2014 06:06:20 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:48837 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XihBf-0003XW-M4 for emacs-devel@gnu.org; Mon, 27 Oct 2014 06:06:07 -0400 Original-Received: (qmail 51264 invoked by uid 3782); 27 Oct 2014 10:06:06 -0000 Original-Received: from acm.muc.de (pD951B8EC.dip0.t-ipconnect.de [217.81.184.236]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 27 Oct 2014 11:06:05 +0100 Original-Received: (qmail 3056 invoked by uid 1000); 27 Oct 2014 10:05:26 -0000 Content-Disposition: inline In-Reply-To: <8361f6420v.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175888 Archived-At: Hello, Eli. On Mon, Oct 27, 2014 at 05:36:32AM +0200, Eli Zaretskii wrote: > > Date: Sun, 26 Oct 2014 22:15:30 +0000 > > Cc: Eli Zaretskii , emacs-devel@gnu.org > > From: Alan Mackenzie > > Maybe Eli's suggestion of rewriting scroll-up and scroll-down from > > scratch in Elisp could work, but if I'm not mistaken, there's no > > infrastructural support for window lines, etc., which doesn't involve > > fontification. This would have to be written. > Since you don't really care about accuracy here, .... That was an uncalled for gibe. I care a great deal about accuracy here. Perhaps we understand different things by "accuracy". > .... you could simply move in physical lines. That's fast and doesn't > need any support from the display engine. This would end up in the wrong place if there were as much as a single continued line in the window. And one needs to know how many lines fit in the window. When a user types a single PageDown/PageUp, it MUST scroll reliably to the right place. That involves knowing where continuation lines are, possibly where invisible characters are. And one must take account of next-screen-context-lines, and the like. One might argue for using different functions for, on the one hand, single scroll operations and scrolling over already fontified text, and on the other hand auto-repeated ones over non-fontified text, where the accuracy matters much less, but that's anything but simple, and would require hairy stuff somewhere. If I understand correctly, your notion of accuracy in scrolling absolutely requires that all text scrolled over must be fully fontified. I don't see that this makes any sense at all on ttys, and in the very common case that all characters are equally big on a GUI. All I need for fast scrolling is some way of telling the display code that all characters are the same size, and that fontification is thus necessary only for display. Why are you so opposed to such an optimisation? You have asserted that my patch would lead to inaccurate scrolling. Can you give a concrete example of that happening? > > If movement on a window absolutely requires fontified characters, then > > some means will need to be found for the display code to tell jit-lock > > HOW MUCH needs fontifying, and for that amount to be much less than 500 > > bytes in the non-display case. I think I misunderstood things last night. The display engine actually requires ALL text to be fontified when moving over it, doesn't it? > There already is such a parameter, you just need to use it. fontification-functions is called with just one parameter, the buffer position. Where is this other size parameter? > > One might argue that CC Mode fontification should be speeded up. Yes, it > > should, but it's not ever going to be speeded up by an order of > > magnitude. > I don't see why not. We could rewrite that stuff in C. Patches welcome. ;-) -- Alan Mackenzie (Nuremberg, Germany).