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#64818: 30.0.50; c++-ts-mode highlight does not work Date: Mon, 24 Jul 2023 16:46:47 +0300 Message-ID: <834jlts9q0.fsf@gnu.org> References: <83sf9dsewi.fsf@gnu.org> <87ila9sann.fsf@thornhill.no> 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="27629"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64818@debbugs.gnu.org, dianchengwang@gmail.com, casouri@gmail.com To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 24 15:47:39 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 1qNvuT-0006xh-TU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Jul 2023 15:47:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNvu1-0005g2-0N; Mon, 24 Jul 2023 09:47:09 -0400 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 1qNvtv-0005fk-95 for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 09:47:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qNvtv-0003l5-02 for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 09:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNvtu-00089P-Hu for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 09:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jul 2023 13:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64818 X-GNU-PR-Package: emacs Original-Received: via spool by 64818-submit@debbugs.gnu.org id=B64818.169020637231275 (code B ref 64818); Mon, 24 Jul 2023 13:47:02 +0000 Original-Received: (at 64818) by debbugs.gnu.org; 24 Jul 2023 13:46:12 +0000 Original-Received: from localhost ([127.0.0.1]:42198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNvt6-00088L-0l for submit@debbugs.gnu.org; Mon, 24 Jul 2023 09:46:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNvt3-000887-Mh for 64818@debbugs.gnu.org; Mon, 24 Jul 2023 09:46:10 -0400 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 1qNvsx-0003cP-R2; Mon, 24 Jul 2023 09:46:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=tFOKaVqwDUzQg7YD/Zo3YXLemOsqelPHyb1PAclJS5c=; b=Z6PliW2xDzHj7l20C5lq zUZNTTT8KOSuhoCnOZxbmPKp8X6txEFJsTlAfbwt+UQU7mD732dWYGxE5dZ4NM4gqlL5BkpFik8vT YSWW4T3X+XqWMP2Z0Rr8Xb97koU7ghybSETiiDZizmuFKqB/Ifbnjcqx0KUFsMzVi7bBuj5mJFhbd c/gVkoeUgFI5pscAP+/iPPtGNIJXv+HaqnJFeyX/Joj9CQw6GRGLGN3+C9Xv9u8h6jK6EeWZOKfwv ND9jJoOPYi2uenk/CIAiNgzgc0nHLjEMJyQuj7KfRlNR3f1zkXV3K24Y39uQGyCb/AT5/MzgdNtQv TcPXJ+j3i7rirg==; 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 1qNvsx-0007VQ-Ah; Mon, 24 Jul 2023 09:46:03 -0400 In-Reply-To: <87ila9sann.fsf@thornhill.no> (message from Theodor Thornhill on Mon, 24 Jul 2023 15:26:36 +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:265971 Archived-At: > From: Theodor Thornhill > Cc: 64818@debbugs.gnu.org > Date: Mon, 24 Jul 2023 15:26:36 +0200 > > Eli Zaretskii writes: > > >> From: Wang Diancheng > >> Date: Mon, 24 Jul 2023 12:49:06 +0800 > >> > >> I use the latest tree-sitter and tree-sitter modules. > >> Only preprocessor instructions and comments are highlighted, please see attached > >> screenshot. BTW c-ts-mode highlight is OK. > >> > >> Following are values of treesit-font-lock-feature-list and > >> treesit-font-lock-level: > >> > >> treesit-font-lock-feature-list is a variable defined in ‘treesit.el’. > >> > >> Its value is > >> ((comment definition) (keyword preprocessor string type) > >> (assignment constant escape-sequence label literal) > >> (bracket delimiter error function operator property variable)) > >> Local in buffer sql_select.cc; global value is nil > >> > >> treesit-font-lock-level is a variable defined in ‘treesit.el’. > >> > >> Its value is 3 > > > > Thanks. > > > > Yuan, Theo: can you please look into this? I can confirm the above > > behavior, and I also see it in the very first pretest 29.0.90. So > > either some change broke c++-ts-mode before April, or maybe the latest > > changes in the C++ grammar library did that. treesit-explore-mode > > seems to show that the code is parsed correctly, so why aren't > > fontifications working? > > With the version of the grammar on my system everything worked > perfectly, but I updated the grammar, and now I can reproduce. So it > seems something upstream broke it. I'll bisect tree-sitter-cpp and > figure out whats breaking it. Thanks. The other report about this perhaps gives a hint: > From: David Come > Date: Mon, 24 Jul 2023 09:13:33 +0000 > msip_labels: > > When opening a C++ file with major mode c++-ts-mode, there is not > coloration > > In the Messsage buffer, I see > > Error during redisplay: (jit-lock-function 14) signaled (treesit-query-error "Node type error at" 99 "(true) > @font-lock-constant-face (false) @font-lock-constant-face (null) @font-lock-constant-face (nullptr) > @font-lock-constant-face" "Debug the query with `treesit-query-validate'") [2 times]