Received: (at submit) by debbugs.gnu.org; 30 Dec 2022 12:25:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 30 07:25:00 2022
Received: from localhost ([127.0.0.1]:33675 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1pBERX-0006Og-LA
for submit <at> debbugs.gnu.org; Fri, 30 Dec 2022 07:24:59 -0500
Received: from lists.gnu.org ([209.51.188.17]:43666)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <acm@HIDDEN>) id 1pBERV-0006OY-E3
for submit <at> debbugs.gnu.org; Fri, 30 Dec 2022 07:24:58 -0500
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 <acm@HIDDEN>) id 1pBERS-0002kR-5Z
for bug-gnu-emacs@HIDDEN; Fri, 30 Dec 2022 07:24:56 -0500
Received: from mx3.muc.de ([193.149.48.5])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <acm@HIDDEN>) id 1pBERQ-0007nP-9I
for bug-gnu-emacs@HIDDEN; Fri, 30 Dec 2022 07:24:53 -0500
Received: (qmail 72923 invoked by uid 3782); 30 Dec 2022 13:24:39 +0100
Received: from acm.muc.de (p4fe15ce1.dip0.t-ipconnect.de [79.225.92.225])
(using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
Fri, 30 Dec 2022 13:24:38 +0100
Received: (qmail 14856 invoked by uid 1000); 30 Dec 2022 12:24:38 -0000
Date: Fri, 30 Dec 2022 12:24:38 +0000
To: bug-gnu-emacs@HIDDEN
Subject: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an
exception in redisplay.
Message-ID: <Y67YhlqC9GENlILo@ACM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
Received-SPF: pass client-ip=193.149.48.5; envelope-from=acm@HIDDEN;
helo=mx3.muc.de
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)
Hello, Emacs.
In the emacs-29 branch, with the latest commit being:
commit 558b59d81b938fc434e62523106360b9704c88e2 (HEAD -> emacs-29, origin/emacs-29, origin/HEAD)
Author: Yuan Fu <casouri@HIDDEN>
Date: Thu Dec 29 11:52:06 2022 -0800
Add color fontification in css-ts-mode (bug#60405)
:
(i) emacs -Q
(ii) (setq backtrace-on-redisplay-error t)
(iii) C-x b string.cc <RET>
(iv) M-x c++-ts-mode <RET>
(v) Type "char" (without the quote marks).
This throws an exception in the redisplay code. The backtrace in the
*Redisplay-trace* buffer is:
Error: treesit-query-error ("Node type error at" 195 "Debug the query with `treesit-query-validate'")
debug-early-backtrace()
debug-early(error (treesit-query-error "Node type error at" 195 "Debug the query with `treesit-query-validate'"))
treesit-font-lock-fontify-region(1 5 nil)
font-lock-default-fontify-region(1 5 nil)
font-lock-fontify-region(1 5)
#f(compiled-function (fun) #<bytecode -0x156ee3e72a1d5e83>)(font-lock-fontify-region)
jit-lock--run-functions(1 5)
jit-lock-fontify-now(1 5)
jit-lock-function(1)
redisplay_internal\ \(C\ function\)()
.. That this insertion causes an exception is clearly a bug.
But the contents of the backtrace seem to me to be less helpful than they
might be. What does the "the" in "the query" refer to? There is no
referent yet established. What does the 195 refer to? It clearly isn't
a buffer position, which is what it would mean in lots of other Emacs
error messages.
Just as a matter of interest, in c-ts-mode, the above actions run without
problem.
--
Alan Mackenzie (Nuremberg, Germany).
Alan Mackenzie <acm@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#60427; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.