From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57669: 29.0.50; C-n, C-p off under long lines Date: Sat, 10 Sep 2022 16:09:04 +0300 Message-ID: <83v8pv9y1b.fsf@gnu.org> References: <87y1uujufi.fsf@dick> <87illxka46.fsf@dick> <8335d1dr39.fsf@gnu.org> <87mtb8hezl.fsf@dick> <838rmsd4cc.fsf@gnu.org> <878rmsh9me.fsf@dick> <87zgf8fsv3.fsf@dick> <83zgf8bkmn.fsf@gnu.org> <83v8pwbjvy.fsf@gnu.org> <87a678fnnz.fsf@dick> <83r10kbex8.fsf@gnu.org> <875yhwflw7.fsf@dick> <83pmg4bcjt.fsf@gnu.org> <87wnace31g.fsf@dick> <87k06cdx8m.fsf@dick> <87fsh0dt7y.fsf@dick> <8335czbpe6.fsf@gnu.org> <87y1urcryx.fsf@dick> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26402"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57669@debbugs.gnu.org To: dick Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 10 15:10:33 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oX0Fj-0006in-Ms for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 15:10:31 +0200 Original-Received: from localhost ([::1]:34514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX0Fi-0007eF-2s for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 09:10:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX0FG-0007e5-8a for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 09:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX0FF-0004Hc-Uq for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 09:10:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX0FF-00078j-Qj for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 09:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Sep 2022 13:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57669 X-GNU-PR-Package: emacs Original-Received: via spool by 57669-submit@debbugs.gnu.org id=B57669.166281537427405 (code B ref 57669); Sat, 10 Sep 2022 13:10:01 +0000 Original-Received: (at 57669) by debbugs.gnu.org; 10 Sep 2022 13:09:34 +0000 Original-Received: from localhost ([127.0.0.1]:36822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX0Eo-00077x-9E for submit@debbugs.gnu.org; Sat, 10 Sep 2022 09:09:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX0Ek-00077j-Cb for 57669@debbugs.gnu.org; Sat, 10 Sep 2022 09:09:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX0Ef-00049K-4C; Sat, 10 Sep 2022 09:09:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=IswbGMNwC5lnVIitb77utfzJLgP3yxMuokIV3sk+8GE=; b=Jua3d/HyaKzz Jo2NafxAVtp1rVT+9k6EnyU1ihDEJd/Lzg91+wNj5ltla1RN8la4HEprHgpD5AfYPdO9u0OTPXlmJ q1toBsl/e55rfiNdkt6B+okAd6NJjWJbR3n1WwwzmhkHhs6Y8qAVvmn4fbRkBWAlWkpXFl2gCfDjA pMRI6/nG4VGK/Vug7aDGyiPKjM0iBV1VIjdc+P2VHOnNw+MXoiSlCfA0nPM9vnBuGoUFRr/W+j0B4 z7y8kJmhyupRpAccUsxm6Oe2uOcC3nqFSmFD+zE6axIqcyNQwM/94ZrH44waAqCIxA/JRBa+dCKGK GG56LlrMsD+4uuS3r/B2FA==; Original-Received: from [87.69.77.57] (port=4380 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX0Ee-0000Ep-JG; Sat, 10 Sep 2022 09:09:24 -0400 In-Reply-To: <87y1urcryx.fsf@dick> (message from dick on Sat, 10 Sep 2022 08:51:50 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242101 Archived-At: > From: dick > Cc: 57669@debbugs.gnu.org > Date: Sat, 10 Sep 2022 08:51:50 -0400 > > monospace-p I agree is an heuristic like narrowing. In the majority of > cases of long lines, it applies the algebraic shortcut when it thinks it > can get away with it. My guess is that it disables the shortcut in any buffer that has font-lock turned on. Turning off font-lock is known to speed up things significantly, even without the shortcut, but we thought that turning it off would be asking too much. Thus, a satisfactory solution must work in the presence of faces and in the presence of different fonts, because the real-life use cases where we see very long lines use both. So I think we can only apply such shortcuts when lines are very long, in which case the resulting inaccuracies in layout calculations could be perhaps tolerated. I don't think it's feasible to apply them always, because once we make behaved_p accurate enough (if that is at all feasible), it will probably lose its attractiveness. The other question is: if we apply these shortcuts when lines are very long, what do we gain? If performance becomes significantly better, it would perhaps mean we can enlarge long-line-threshold's value, or make the default narrowing region larger. But I don't think we can avoid the narrowing completely, because anything else will still scale at least linearly with the line length, and so will at some point become unbearably slow.