From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#61215: 29.0.60; font-lock broken in diff-mode with long lines Date: Fri, 03 Feb 2023 09:53:57 +0200 Organization: LINKOV.NET Message-ID: <86bkmbfalm.fsf@mail.linkov.net> References: <86lelh6yhq.fsf_-_@mail.linkov.net> <83cz6tz12b.fsf@gnu.org> <86o7qcf2x5.fsf@mail.linkov.net> <83a61vx0jo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2184"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 61215@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 03 08:58:32 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 1pNqxq-0000Mn-NH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Feb 2023 08:58:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNqxW-0004jE-33; Fri, 03 Feb 2023 02:58:10 -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 1pNqxP-0004iV-Bk for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 02:58:04 -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 1pNqxO-0007qd-TD for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 02:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNqxO-0006kQ-Pe for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 02:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Feb 2023 07:58:02 +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.167541106825910 (code B ref 61215); Fri, 03 Feb 2023 07:58:02 +0000 Original-Received: (at 61215) by debbugs.gnu.org; 3 Feb 2023 07:57:48 +0000 Original-Received: from localhost ([127.0.0.1]:36430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNqx9-0006jq-Pf for submit@debbugs.gnu.org; Fri, 03 Feb 2023 02:57:48 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNqx8-0006jR-F0 for 61215@debbugs.gnu.org; Fri, 03 Feb 2023 02:57:46 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 8D7E3E0003; Fri, 3 Feb 2023 07:57:38 +0000 (UTC) In-Reply-To: <83a61vx0jo.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 Feb 2023 22:41:31 +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:254718 Archived-At: >> 1. Set debug-on-error and backtrace-on-redisplay-error to t >> 2. Create a commit with some diff hunks in a prog mode at the beginning, >> and a single-line 1MB file added at the end; >> 3. From *vc-change-log* type `d' on that commit that opens *vc-diff* buffer >> 4. Scroll the *vc-diff* buffer >> >> It displays an error in the *Warning* buffer: >> >> ⛔ Warning (error): Error in a redisplay Lisp hook. See buffer *Redisplay_trace* > > Can you reproduce this easily? Once you create such a commit, it's easy to reproduce this on it. > If so, does the patch below help? Unfortunately, no. Still such a backtrace: Error: args-out-of-range (# 2000 1906) mapbacktrace(#f(compiled-function (evald func args flags) #)) debug-early-backtrace() debug-early(error (args-out-of-range # 2000 1906)) buffer-substring-no-properties(2000 1906) (let* ((hunk (buffer-substring-no-properties (max beg (point-min)) (min end (point-max)))) ... diff-syntax-fontify-hunk(2000 250945 nil) diff-syntax-fontify(2000 250945) #(2000 250945) diff--iterate-hunks(10000 #) diff--font-lock-syntax(10000) font-lock-fontify-keywords-region(1527 10000 nil) font-lock-default-fontify-region(1527 3027 nil) font-lock-fontify-region(1527 3027) #f(compiled-function (fun) #)(font-lock-fontify-region) run-hook-wrapped(#f(compiled-function (fun) #) font-lock-fontify-region) jit-lock--run-functions(1527 3027) jit-lock-fontify-now(1527 3027) jit-lock-function(1527) redisplay_internal\ \(C\ function\)()