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#23457: 24.5; interactive use of next-line and previous-line (holding down C-n or C-p) lag in a buffer with all spaces and newlines Date: Fri, 06 May 2016 12:15:02 +0300 Message-ID: <8337pvh7jd.fsf@gnu.org> References: <8637pwubct.fsf@NOTE-REPLACE.i-did-not-set--mail-host-address--so-tickle-me> <83wpn8h4tj.fsf@gnu.org> <83h9ecgvca.fsf@gnu.org> <83futwgtti.fsf@gnu.org> <8360urhdna.fsf@gnu.org> <87h9ebr50n.fsf@petton.fr> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1462526201 1300 80.91.229.3 (6 May 2016 09:16:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 May 2016 09:16:41 +0000 (UTC) Cc: nicolas@petton.fr, 23457@debbugs.gnu.org To: James McClain Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 06 11:16:30 2016 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 1aybs5-0005ma-QO for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 May 2016 11:16:29 +0200 Original-Received: from localhost ([::1]:57205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aybs1-0005sJ-W5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 May 2016 05:16:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aybrt-0005eC-8o for bug-gnu-emacs@gnu.org; Fri, 06 May 2016 05:16:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aybrh-0004wo-IB for bug-gnu-emacs@gnu.org; Fri, 06 May 2016 05:16:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aybrh-0004vP-F5 for bug-gnu-emacs@gnu.org; Fri, 06 May 2016 05:16:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aybre-0007mH-40 for bug-gnu-emacs@gnu.org; Fri, 06 May 2016 05:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 May 2016 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23457 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 23457-submit@debbugs.gnu.org id=B23457.146252611129833 (code B ref 23457); Fri, 06 May 2016 09:16:02 +0000 Original-Received: (at 23457) by debbugs.gnu.org; 6 May 2016 09:15:11 +0000 Original-Received: from localhost ([127.0.0.1]:41132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aybqp-0007l7-BH for submit@debbugs.gnu.org; Fri, 06 May 2016 05:15:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aybqo-0007kv-3P for 23457@debbugs.gnu.org; Fri, 06 May 2016 05:15:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aybqZ-0004RK-Hd for 23457@debbugs.gnu.org; Fri, 06 May 2016 05:15:01 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aybqZ-0004QE-Ej; Fri, 06 May 2016 05:14:55 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2623 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aybqT-0006lY-9J; Fri, 06 May 2016 05:14:49 -0400 In-reply-to: (message from James McClain on Fri, 6 May 2016 01:43:55 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:117898 Archived-At: > From: James McClain > Date: Fri, 6 May 2016 01:43:55 -0700 > Cc: Eli Zaretskii , 23457@debbugs.gnu.org > > For this to happen there needs to be many lines of just spaces and a > newline. I talked about in a previous message having 67 of those > lines, but I believe on my linux box it required more (less than 100 > though). You also need to go to the very end of the file M->, then > scroll up through the lines up to the top. I did not make that clear. Ah! Now I do see this. And this doesn't happen in *scratch*, right? To make the problem go away, do this: M-x set-variable RET bidi-paragraph-direction RET left-to-right RET In any buffer whose major mode supports some programming language (like *scratch*, which supports Emacs Lisp), the above variable is already set to that value by default, so the problem won't happen. Anyway, now that I see the problem and understand its reasons, is there any real-life use case where this problem happens? If so, please describe that use case. Otherwise, this is expected behavior, and this bug should be closed. > I experience lag doing this, to be clear about what I mean by that. I > can cancel by using C-g, but unless I do that, I cannot execute > commands until emacs finishes moving up lines. Which takes much longer > than if instead of all spaces, I had instead one period before the > newline. The contents of the buffer that you describe make redisplay work very hard, so the time it takes to refresh the display after you move point is long. On my machine, a single C-p from the end of a 200-line buffer with all-blank lines takes 2 sec in an unoptimized build, and less than 1 sec in an optimized build. > I cannot remember if I tested with with emacs -Q -nw on linux. No need, now that I understand the problem. Thanks.