From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) Date: Sat, 20 Aug 2022 23:22:23 +0000 Message-ID: <37dd2827f52c6a150684@heytings.org> References: <87bksmx1j1.fsf@localhost> <8335dxiu6m.fsf@gnu.org> <87y1vnjgmn.fsf@gnus.org> <83y1vncbq5.fsf@gnu.org> <87r11fgi7h.fsf@gnus.org> <83sflvc85y.fsf@gnu.org> <87h729902w.fsf@gnus.org> <83edxdbs96.fsf@gnu.org> <87wnb5wthm.fsf@gnus.org> <83pmgxfyc7.fsf@gnu.org> <87fshtwsys.fsf@gnus.org> <877d35wsdd.fsf@gnus.org> <83ilmpfwrf.fsf@gnu.org> <8735dtwrar.fsf@gnus.org> <83h729ft60.fsf@gnu.org> <87tu68v3uu.fsf@gnus.org> <83tu68e83u.fsf@gnu.org> <87fshsteqc.fsf@gnus.org> <87bksgte5e.fsf@gnus.org> <877d34tdwf.fsf@gnus.org> <83pmgwdxhh.fsf@gnu.org> <8735dstdhn.fsf@gnus.org> <37dd2827f52038e95791@heytings.org> <83wnb2ddxd.fsf@gnu.org> <37dd2827f57a3d664931@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29140"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 57207@debbugs.gnu.org, yantar92@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 21 01:23:15 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 1oPXoA-0007Lc-JV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Aug 2022 01:23:14 +0200 Original-Received: from localhost ([::1]:55448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPXo8-0004Xs-Kb for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Aug 2022 19:23:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPXny-0004WD-EI for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 19:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPXny-0005zy-5G for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 19:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oPXnx-00064x-NH for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 19:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Aug 2022 23:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57207 X-GNU-PR-Package: emacs Original-Received: via spool by 57207-submit@debbugs.gnu.org id=B57207.166103775123331 (code B ref 57207); Sat, 20 Aug 2022 23:23:01 +0000 Original-Received: (at 57207) by debbugs.gnu.org; 20 Aug 2022 23:22:31 +0000 Original-Received: from localhost ([127.0.0.1]:33599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPXnS-00064E-SX for submit@debbugs.gnu.org; Sat, 20 Aug 2022 19:22:31 -0400 Original-Received: from heytings.org ([95.142.160.155]:33588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPXnN-000640-Fx for 57207@debbugs.gnu.org; Sat, 20 Aug 2022 19:22:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661037743; bh=Jx/quMsF29Wy4jXBP3CIoYb3VhUntIiIuBibcT0wzf0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=oZbFudCN2grCjz5lANr+rEEAJVGRCKnZid8ylBBDbL+xhKjIS99NrUfFmhbfh9uzK h5vNt9x0FhaTwrCfmwl8+NkWIa1adOre97Q0xmp19jn8I03IidJjxxRDC83AhTyWcs Llrl6GIhwVOSVjM/6bjrQz51BXhyXgzNJ9tiIo/lQUE7qeEZHhGCav38rSh37oK04m q+luAuN7OaYTe2xCxi2n/+Q8AWnD5CDkcxBtBvhOYvIMdXWjz+oeY/zOnt8S2ESpK4 eEKTu7Pm5fQkQfGtq8ukiEn+4JDmcOh8FtKWyzQgmJudArYp65kvczpVdei7YIYLUa egZH11P0JlhwQ== In-Reply-To: <37dd2827f57a3d664931@heytings.org> 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:240270 Archived-At: >> That's too late, I think? How do we ensure after that the update of >> the mode-line (in case the hook really wants to change the >> restriction)? > > Hmmm... I guess I need to think about this a bit more! > Actually, that bug is a symptom of a problem that happens everywhere in decode_mode_spec: whenever BEGV and ZV are used, their values could be wrong if the calculation happens when locked narrowing is in effect. One thing I don't understand there is that in some places we use BEGV and ZV (namely, case 'i' and case 'I'), and everywhere else we use BUF_BEGV (b) and BUF_ZV (b). These should be equivalent given that b is set to current_buffer, but perhaps I'm missing something. Is it also guaranteed that XBUFFER (w->contents) == current_buffer? It seems that it is, but there is no eassert, so I'm not entirely sure. (I tried to add one and did not see the assertion fail.)