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 18:30:17 +0200 Message-ID: <83r47wausm.fsf@gnu.org> References: <52E38286.1050306@gmx.at> <838uu4cq11.fsf@gnu.org> <52E3D131.2090705@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1390667478 30866 80.91.229.3 (25 Jan 2014 16:31:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 16:31:18 +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 17:31:24 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 1W768h-0007p2-7z for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 17:31:23 +0100 Original-Received: from localhost ([::1]:51761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W768g-0008TB-MY for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 11:31:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W768Z-0008Sx-1a for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 11:31:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W768U-0008Hx-8b for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 11:31:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W768O-0008Hf-Q2; Sat, 25 Jan 2014 11:31:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W768N-0007kd-UV; Sat, 25 Jan 2014 11:31:04 -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 16:31:03 +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.139066744029572 (code B ref 16526); Sat, 25 Jan 2014 16:31:03 +0000 Original-Received: (at 16526) by debbugs.gnu.org; 25 Jan 2014 16:30:40 +0000 Original-Received: from localhost ([127.0.0.1]:35826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W767x-0007gc-Ud for submit@debbugs.gnu.org; Sat, 25 Jan 2014 11:30:39 -0500 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:44178) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W767r-0007fM-Ef for 16526@debbugs.gnu.org; Sat, 25 Jan 2014 11:30:33 -0500 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0MZY00700T9I4700@mtaout26.012.net.il> for 16526@debbugs.gnu.org; Sat, 25 Jan 2014 18:29:46 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZY006NGTTMX320@mtaout26.012.net.il>; Sat, 25 Jan 2014 18:29:46 +0200 (IST) In-reply-to: <52E3D131.2090705@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:83998 Archived-At: > Date: Sat, 25 Jan 2014 15:58:57 +0100 > From: martin rudalics > CC: 16526@debbugs.gnu.org, acm@muc.de > > > Probably. I actually don't understand how come scroll-conservatively > > affects non-scrolling commands. Can you elaborate on that? > > 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. > > You also mentioned back_comment doing something unreasonable. Can you > > expand on that, too? This part specifically I don't understand: > > > >> What happens is that apparently back_comment 530 times scans the buffer > >> from the beginning of the buffer to the first comment before the current > >> position where the list of current positions goes like this: > > > > Since the problem happens as result of beginning-of-buffer, why would > > back_comment need to "scan the buffer from the beginning of the buffer > > to the first comment before the current position"? And what is the > > current position in this case? > > I earlier posted the first and last positions here: > > (780 14143 15852 18026 20032 20480 21464 21846 22845 23484 25453 26968 > ... > 942907 943099 944334 948653 948830 948653 948830 948653 948830 948653 > 948830 780 12) What I see is that find_defun_start is called many times, with its first argument moving from _end_ of the buffer backwards. This happens when Emacs needs to redisplay the last portion of the buffer, immediately after the call to end-of-buffer. Alan, I suspect that you tried to reproduce this without setting scroll-conservatively to a value above 100. Because otherwise this is 100% reproducible. If you still cannot reproduce this, please tell us what information to collect for you. > > Btw, if I disable font-lock ("M-x global-font-lock-mode RET") before > > repeating the recipe, the move to bob is instantaneous, and turning on > > font-lock after that doesn't seem to have any adverse effects on > > responsiveness. > > Sure. The problem happens obviously via jit-lock. 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.