From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Mon, 15 Aug 2022 10:26:00 -0400 Message-ID: References: <866e510d-a060-7daa-d002-97861d056fa7@yandex.ru> <1144021660321893@iva5-64778ce1ba26.qloud-c.yandex.net> <12348081660379417@sas2-a098efd00d24.qloud-c.yandex.net> <66bbbb95983414e79637@heytings.org> <83wnbckp0q.fsf@gnu.org> <8e884ebe-2d2e-d599-15c3-a5cfe5e6b295@yandex.ru> <83o7wnl7ok.fsf@gnu.org> <036414cc-c711-efaf-ed5b-f8ccfaca0604@yandex.ru> <5900f20836753183a6ac@heytings.org> <5c22e38a-5dcd-860e-28a0-b4a5ede6a21b@yandex.ru> <877d3awb92.fsf@localhost> <87pmh2z277.fsf@localhost> <87mtc6yzfv.fsf@localhost> <6be37aac-f305-16e0-b856-6884108f940e@yandex.ru> <87h72d4slv.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21943"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56682@debbugs.gnu.org, Gregory Heytings , Eli Zaretskii , Dmitry Gutov To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 16:27:14 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 1oNb3h-0005Vn-Jq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 16:27:13 +0200 Original-Received: from localhost ([::1]:36114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNb3g-0002ra-9H for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 10:27:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNb3W-0002rB-60 for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 10:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNb3V-0004a6-Tz for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 10:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNb3V-0003IQ-NC for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 10:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 14:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.166057360212644 (code B ref 56682); Mon, 15 Aug 2022 14:27:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 15 Aug 2022 14:26:42 +0000 Original-Received: from localhost ([127.0.0.1]:43764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNb3C-0003Hs-BS for submit@debbugs.gnu.org; Mon, 15 Aug 2022 10:26:42 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNb39-0003Hf-S3 for 56682@debbugs.gnu.org; Mon, 15 Aug 2022 10:26:40 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 41CD010002A; Mon, 15 Aug 2022 10:26:34 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A02F0100121; Mon, 15 Aug 2022 10:26:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1660573592; bh=eC0gEntaF0Rhth7eamfm6Q96iIEA/CLwlyK6emJenAg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SLpzt+Coy/eq7tiOXS4TSpIf5bkiNkEhBKaAYpqxb6ddFzyDikZRHgOdfjEI0kjK3 zHs2duz/oHW8pS+ySmJVcSstDK/ZEC4bIW7i0GGHAzVKl5MiR+a63cSyhQ06zql6wD Psom+5GFi9wYGv+PzKYh8GD2K03hpWYJWeohoKRKushI1oonEeeI0R8rYwMflBZLqN /2BCYhEXV2MWSdY3N3C9jTUdBg2KsSmh1NzVNP3YA9BxEs8yBtGmqW/Ho4Fb5mHsYG 0jti8fZqWDxgzdyby/kMvnriw4FynTn+qp9veqpEoF348nZITBaQcXJeY8sofB6Ubz aJTw4vM2Fv61Q== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8B5C71203A9; Mon, 15 Aug 2022 10:26:32 -0400 (EDT) In-Reply-To: <87h72d4slv.fsf@localhost> (Ihor Radchenko's message of "Mon, 15 Aug 2022 20:08:12 +0800") 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:239803 Archived-At: > However, I do insist on my statement that expecting major-mode to not > widen is a bug. No, it's a design decision, which makes it possible to use specific implementation techniques. Org-mode's support for multiple major modes (org-babel) uses an implementation technique that does not require narrowing. Both approaches have their virtues and downsides, but if the submode widens then the supermode has less freedom in terms of which implementation technique to use. > There are valid cases when a major mode needs to examine > the whole buffer. Not if the whole buffer contains text which the major mode can't understand. There are valid cases where a major mode needs to widen, indeed, but not when called from font-lock or from `indent-line-function`. Stefan