From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16526: 24.3.50; scroll-conservatively & c-mode regression Date: Sat, 25 Jan 2014 15:58:57 +0100 Message-ID: <52E3D131.2090705__7892.60823880813$1390662037$gmane$org@gmx.at> References: <52E38286.1050306@gmx.at> <838uu4cq11.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1390662024 5768 80.91.229.3 (25 Jan 2014 15:00:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 15:00:24 +0000 (UTC) Cc: acm@muc.de, 16526@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 25 16:00:30 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 1W74ik-0004sB-1g for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 16:00:30 +0100 Original-Received: from localhost ([::1]:51504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W74ij-0004MJ-OJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 10:00:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W74iY-0004Ey-KK for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 10:00:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W74iR-0007ea-6F for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 10:00:18 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W74iJ-0007Rk-Fz; Sat, 25 Jan 2014 10:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W74iJ-0003G2-2f; Sat, 25 Jan 2014 10:00:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 25 Jan 2014 15:00: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.139066195112410 (code B ref 16526); Sat, 25 Jan 2014 15:00:02 +0000 Original-Received: (at 16526) by debbugs.gnu.org; 25 Jan 2014 14:59:11 +0000 Original-Received: from localhost ([127.0.0.1]:35806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W74hS-0003E4-66 for submit@debbugs.gnu.org; Sat, 25 Jan 2014 09:59:11 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:51250) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W74hP-0003DP-3d for 16526@debbugs.gnu.org; Sat, 25 Jan 2014 09:59:08 -0500 Original-Received: from [62.47.61.211] ([62.47.61.211]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Mcmmn-1Vp8Cr1mtt-00HzQF for <16526@debbugs.gnu.org>; Sat, 25 Jan 2014 15:59:00 +0100 In-Reply-To: <838uu4cq11.fsf@gnu.org> X-Provags-ID: V03:K0:U2GgeYE3gOkMbdtgKAdrSTE2V+52zCI5SPST5w3E6s4q0USmR1x 7mPwWz/PlxzUY49dlc3lb6VSqbE6nbRnWmqFeRwVaQB8ajR7q6Kr+OvuR3mYC/QwFA2RHFa 7/K0RluRtKbbZxhhHpcTjOiGgLPJN8X7VWpBhHzGHVmbp+jLgqlbfctFZaliP6ATS0kvpMw ao9qkT2/VHwY/hHhisDgg== 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:83996 Archived-At: > 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. > 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) You can try by yourself. I gathered the positions in the following excerpt find_defun_start (ptrdiff_t pos, ptrdiff_t pos_byte) { ptrdiff_t opoint = PT, opoint_byte = PT_BYTE; if (!open_paren_in_column_0_is_defun_start) { find_start_value = BEGV; find_start_value_byte = BEGV_BYTE; find_start_buffer = current_buffer; find_start_modiff = MODIFF; find_start_begv = BEGV; find_start_pos = pos; <---------------------------- right here return BEGV; } > 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. But IMHO disabling `open-paren-in-column-0-is-defun-start' IS asking for trouble as long as back_comment doesn't rely on `syntax-ppss' to find a safe position. martin