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 20:31:10 +0200 Message-ID: <83k3dnc3rl.fsf@gnu.org> References: <52E38286.1050306@gmx.at> <838uu4cq11.fsf@gnu.org> <52E3D131.2090705@gmx.at> <83r47wausm.fsf@gnu.org> <52E3EAC2.2040100@gmx.at> <83lhy4as2l.fsf@gnu.org> <52E4019C.5080905@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1390674736 12336 80.91.229.3 (25 Jan 2014 18:32:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 18:32:16 +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 19:32:22 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 1W781k-0007hG-Gj for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 19:32:20 +0100 Original-Received: from localhost ([::1]:52145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W781k-0002mE-0K for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 13:32:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W781c-0002m7-BW for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 13:32:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W781X-0006dF-KF for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 13:32:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W781S-0006d0-HI; Sat, 25 Jan 2014 13:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W781S-0006tH-4W; Sat, 25 Jan 2014 13:32: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 18:32: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.139067468926439 (code B ref 16526); Sat, 25 Jan 2014 18:32:02 +0000 Original-Received: (at 16526) by debbugs.gnu.org; 25 Jan 2014 18:31:29 +0000 Original-Received: from localhost ([127.0.0.1]:35895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W780u-0006sM-6H for submit@debbugs.gnu.org; Sat, 25 Jan 2014 13:31:28 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:39525) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W780q-0006sB-TJ for 16526@debbugs.gnu.org; Sat, 25 Jan 2014 13:31:26 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MZY00500ZAI9K00@a-mtaout20.012.net.il> for 16526@debbugs.gnu.org; Sat, 25 Jan 2014 20:31:22 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZY0051MZGA9820@a-mtaout20.012.net.il>; Sat, 25 Jan 2014 20:31:22 +0200 (IST) In-reply-to: <52E4019C.5080905@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:84008 Archived-At: > Date: Sat, 25 Jan 2014 19:25:32 +0100 > From: martin rudalics > CC: 16526@debbugs.gnu.org, acm@muc.de > > >> 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. > > IIUC `beginning-of-buffer' does set_point_both. Does that move all the > way back to the beginning? Of course not, it jumps there in one go. > > And yes, I know why: it's because scroll-conservatively causes > > redisplay to examine buffer text around point, > > Where is `point' at that time? At EOB. > > when it decides where > > to place window-start. This is triggered by redisplay after the move > > to the end of the buffer. > > But the `end-of-buffer' call terminates cleanly after a few seconds - > that's what the `sit-for' proves in my code. Right, and that's when redisplay kicks in, which invokes JIT Lock. > >> 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. > > It hints at some really bad code embedded in really bad code. Not necessarily. Sometimes, this cannot be avoided. More thorough analysis is needed to determine whether it's really bad code. > >> > 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. > > EOB happens before my `sit-for'. See above. Redisplay is separate from command execution. So yes, we are already at EOB, and then redisplay happens. > >> > 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. > > Why? Because we moved there with end-of-buffer.