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#61215: 29.0.60; font-lock broken in diff-mode with long lines Date: Mon, 27 Feb 2023 21:07:31 +0200 Message-ID: <83r0ubgc5o.fsf@gnu.org> References: <86lelh6yhq.fsf_-_@mail.linkov.net> <83cz6tz12b.fsf@gnu.org> <86o7qcf2x5.fsf@mail.linkov.net> <83a61vx0jo.fsf@gnu.org> <86bkmbfalm.fsf@mail.linkov.net> <83pmarufgi.fsf@gnu.org> <86ilggc6gn.fsf@mail.linkov.net> <83mt5sq7nr.fsf@gnu.org> <86edr2davu.fsf@mail.linkov.net> <83lelapsvj.fsf@gnu.org> <86o7pfc91a.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33334"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, 61215@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 27 20:08:10 2023 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 1pWir3-0008Sh-KL for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Feb 2023 20:08:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWiqx-0002MV-9D; Mon, 27 Feb 2023 14:08:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWiqw-0002M7-14 for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2023 14:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWiqv-0005Ua-PD for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2023 14:08:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWiqv-00061f-KL for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2023 14:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Feb 2023 19:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61215 X-GNU-PR-Package: emacs Original-Received: via spool by 61215-submit@debbugs.gnu.org id=B61215.167752485923124 (code B ref 61215); Mon, 27 Feb 2023 19:08:01 +0000 Original-Received: (at 61215) by debbugs.gnu.org; 27 Feb 2023 19:07:39 +0000 Original-Received: from localhost ([127.0.0.1]:48825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWiqY-00060u-Vs for submit@debbugs.gnu.org; Mon, 27 Feb 2023 14:07:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWiqX-00060g-30 for 61215@debbugs.gnu.org; Mon, 27 Feb 2023 14:07:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWiqK-0005L0-5h; Mon, 27 Feb 2023 14:07:31 -0500 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=NV1Q58vBqB3zG4FGGDS+iBQEHPfq7puv1HrUCfN1rdQ=; b=hqySaowmAeAz e5RwyFN4q2tpRPpFukkVDH56777xZZ3KBk8rt2S0T0KN1UcYKaroLwqCQSwMl/ENq3jKB9oBfZoQc C1eOXxc1EweFlX/o2BiW14jBUT7p32I0A7SkmuKVEBb8Pj2U83x/zS7yHHz77M0BKvx86klgWj2dZ 7kZ6EPZeTyz8Xfs1kzHZttX/ewRnvgk53xWVQn66lzBbpmAGWMhBxpPCfPhlMD7s5tkmWZrmUbjTj 9AFNe4nujRX7a/6npRi/ouoWsK+cmcrmWJtCI2Zh6ol1AEytLQzZuby2NrEEP2AUDtQu9zQ2fjy3E 5YGxZyQA6fNEUGHzP+DVRw==; Original-Received: from [87.69.77.57] (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 1pWiqJ-0007Im-1L; Mon, 27 Feb 2023 14:07:23 -0500 In-Reply-To: <86o7pfc91a.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 27 Feb 2023 20:28:33 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256901 Archived-At: > From: Juri Linkov > Cc: Gregory Heytings , 61215@debbugs.gnu.org > Date: Mon, 27 Feb 2023 20:28:33 +0200 > > >> After debugging I discovered that the problem is not caused by font-lock > >> in diff-mode. The problem is in easy-mmode-define-navigation. > >> diff-mode uses it to navigate diff hunks. It supports such a feature > >> that when the user narrowed the diff buffer, it puts narrowing back > >> after moving to the next hunk. But this fails when the diff buffer > >> is narrowed automatically by long-line-optimizations. If there is > >> no way to distinguish whether the narrowing is automatic by long-lines > >> or manual by the user, this patch fixes the problem. It works without > >> errors, and even highlights first 250000 characters of the long line: > > > > Thanks. > > > > Maybe Gregory (CC'ed) can help here and tell whether there's a better > > solution. > > It seems there is no better solution? I think you should be able to use the new facilities to distinguish between user narrowing and that due to long-line-optimizations.