From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16526: 24.3.50; scroll-conservatively & c-mode regression Date: Sat, 25 Jan 2014 19:29:06 +0200 Message-ID: <83lhy4as2l.fsf@gnu.org> References: <52E38286.1050306@gmx.at> <838uu4cq11.fsf@gnu.org> <52E3D131.2090705@gmx.at> <83r47wausm.fsf@gnu.org> <52E3EAC2.2040100@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1390671015 4972 80.91.229.3 (25 Jan 2014 17:30:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 17:30:15 +0000 (UTC) Cc: acm@muc.de, 16526@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 25 18:30:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1W773l-0007EE-3Z for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 18:30:21 +0100 Original-Received: from localhost ([::1]:52032 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W773k-0003Ab-Kx for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 12:30:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W773d-0003AN-IT for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 12:30:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W773Y-0007Fb-SL for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 12:30:13 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W773T-00074F-La; Sat, 25 Jan 2014 12:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W773S-00042W-Hm; Sat, 25 Jan 2014 12:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 25 Jan 2014 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16526 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 16526-submit@debbugs.gnu.org id=B16526.139067096515456 (code B ref 16526); Sat, 25 Jan 2014 17:30:02 +0000 Original-Received: (at 16526) by debbugs.gnu.org; 25 Jan 2014 17:29:25 +0000 Original-Received: from localhost ([127.0.0.1]:35851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W772q-00041D-Rt for submit@debbugs.gnu.org; Sat, 25 Jan 2014 12:29:25 -0500 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:34071) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W772n-000413-Cm for 16526@debbugs.gnu.org; Sat, 25 Jan 2014 12:29:22 -0500 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0MZY00C00W7NZ200@mtaout27.012.net.il> for 16526@debbugs.gnu.org; Sat, 25 Jan 2014 19:28:36 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZY00C77WJN4N20@mtaout27.012.net.il>; Sat, 25 Jan 2014 19:28:36 +0200 (IST) In-reply-to: <52E3EAC2.2040100@gmx.at> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84004 Archived-At: > Date: Sat, 25 Jan 2014 17:48:02 +0100 > From: martin rudalics > CC: 16526@debbugs.gnu.org, acm@muc.de > > >> How should I know? I suppose redisplay_window eventually winds up > >> calling the fontification function and sooner or later the c-code calls > >> back_comment. > > > > Yes, that's what happens. And it cannot be avoided, AFAICS, when > > scroll-conservatively is on. > > Well ... so you know why it calls back_comment around the END of the > buffer? It starts at the end of the buffer, but then moves all the way back to the beginning. And yes, I know why: it's because scroll-conservatively causes redisplay to examine buffer text around point, when it decides where to place window-start. This is triggered by redisplay after the move to the end of the buffer. > > What I see is that find_defun_start is called many times, > > ... 530 times as I mentioned earlier ... > > > with its > > first argument moving from _end_ of the buffer backwards. > > Not monotonously. Sometimes it's called from the same position (for > example 948653 is at least three times on my list) again. True. But I'm not sure this is relevant to the slow redisplay. > > This > > happens when Emacs needs to redisplay the last portion of the buffer, > > immediately after the call to end-of-buffer. > > Hmm ... but the problem is when going to BOB. No, going to BOB is instantaneous. The problem happens in redisplay after going to EOB. > > JIT Lock is triggered also when font-lock is turned on after the move > > to end of the buffer. But the difference seems to come from the fact > > that under scroll-conservatively, we examine the buffer a little bit > > above/below the window, when we decide where to put window-start. > > And somehow a "current position" is still near the end of the buffer at > that time. Yes, because Emacs is at EOB.