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#64830: 30.0.50 C++ treesitter mode no coloration Date: Fri, 16 Aug 2024 20:40:07 +0300 Message-ID: <86o75s5pu0.fsf@gnu.org> References: <868qwy8ii9.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12838"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64830@debbugs.gnu.org, casouri@gmail.com To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 16 19:41:40 2024 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 1sf0xG-0003BW-QN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Aug 2024 19:41:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sf0x5-0000Me-1A; Fri, 16 Aug 2024 13:41:27 -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 1sf0x2-0000MU-AJ for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2024 13:41:24 -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 1sf0x2-0003MK-1U for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2024 13:41:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=IhqJcL4ZFBqNLTZOxVajbef01ojHChOTn2tLBL23Quk=; b=psAsuxI5SPHG1KEdk5RJsGueVBpAp0Z8FCR9S1YJ2aTnTQftqaIqCBi6Wk5ussKIIJlH24HOIitWtlDmggEYUUHdQ6hkxFPjkJ95uRYsrCK10y/QAH+iNr/rb7O/RRDWKVBrBIGzFdbHX+OnkHBgPRuP6Dnhu3fefwhC3DdFDktHSuNsPTc4w6hMYCwG1wf8vONvlZq1NNXe2hR5+bIwmk19X/XtVWW0qz9t+2ZpcfblAr2zaxuDs0usIQBTWul3xlgIp0lNbP2I3Pj4NY+GSLqDI7bbVhxLzqHl5Rd1iOii/ctrJaYN/DLflxMj0gtfU/8fN3SvNDmDLoMDalktMw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sf0xd-00026R-Im for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2024 13:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Aug 2024 17:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64830 X-GNU-PR-Package: emacs Original-Received: via spool by 64830-submit@debbugs.gnu.org id=B64830.17238300678015 (code B ref 64830); Fri, 16 Aug 2024 17:42:01 +0000 Original-Received: (at 64830) by debbugs.gnu.org; 16 Aug 2024 17:41:07 +0000 Original-Received: from localhost ([127.0.0.1]:52799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf0wl-00025B-BA for submit@debbugs.gnu.org; Fri, 16 Aug 2024 13:41:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sf0wj-00024a-BW for 64830@debbugs.gnu.org; Fri, 16 Aug 2024 13:41:06 -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 1sf0vz-0003Gu-9Q; Fri, 16 Aug 2024 13:40:21 -0400 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=IhqJcL4ZFBqNLTZOxVajbef01ojHChOTn2tLBL23Quk=; b=TkrYpVWidRHH TwrY8dwSgxkqT9jMaVNg/i6qhuVldxpCxI4AeTAoGv/BFGI0z/H6r2kNeiHgg1IrTN14maiMd106J QJuchmd7NFXWW4b66RZ8vM6b91g9rC+JHjNtY/ozd/vAvARvvXw3lumNwYdlpiA5EFWrUgCwk4c8M /9beuzaACgujzXFao3SlC/4MCm3cndxyzrxXve4tf8BHpZNJntfYmCdQVmUmpSGpo1Jnthg7TcDrn UvHgr47qJLfKxUzuF6XvWDXL5FT5n2xexXDBp+77JV7bD2zoSgG2fk0eosptp4StHdaH/rcevwblq eNXTQtwzZTvsY54SSu1zFA==; In-Reply-To: (message from Alan Mackenzie on Fri, 16 Aug 2024 16:44:33 +0000) 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:290202 Archived-At: > Date: Fri, 16 Aug 2024 16:44:33 +0000 > Cc: Yuan Fu , 64830@debbugs.gnu.org > From: Alan Mackenzie > > Create the file ~/class-3.cc with the following contents: > ///////////////////////////////////////////////////////////////////////// > // foo > class A > { > struct B { > int i; > }; > struct B { > int i; > }; > }; > ///////////////////////////////////////////////////////////////////////// > > (i) emacs -Q > (ii) M-x load-library c-ts-mode > (iii) C-x C-f ~/class-3.cc > > The buffer, in c++-ts-mode, has no fontification apart from the comment > on its first line. > > > If this happens with any file and in 'emacs -Q", do you see redisplay > > error messages in *Messages*? If so, what are those messages? > > Yes, I see a single message after the above recipe. It's: > > Error during redisplay: (jit-lock-function 1) signaled > (treesit-query-error "Node type error at" 677 "[\"_Atomic\" \"break\" > \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" > \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" > \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" > \"union\" \"volatile\" \"while\" \"and\" \"and_eq\" \"bitand\" \"bitor\" > \"catch\" \"class\" \"co_await\" \"co_return\" \"co_yield\" \"compl\" > \"\concept\" \"consteval\" \"constexpr\" \"constinit\" \"decltype\" > \"delete\" \"explicit\" \"final\" \"friend\" \"mutable\" \"namespace\" > \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\" \"or\" \"or_eq\" > \"override\" \"private\" \"protected\" \"public\" \"requires\" > \"template\" \"throw\" \"try\" \"typename\" \"using\" \"xor\" > \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face > (this) @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug > the query with `treesit-query-validate'") > > > > I think I'm using tree-sitter-cpp version 0.22.2 as downloaded from the > > > Gentoo repository. Is there an easy way to check this from inside > > > Emacs? > > > No, not AFAIK. And the problem is not the version of tree-sitter, it > > is usually the version of the C++ grammar library. Do you know the > > version of that one you have installed? > > I have libtree-sitter-cpp.so.0.14, built and installed on 2024-08-04. > The package is (confusingly) called dev-libs/tree-sitter-cpp-0.22.2. I can reproduce this in Emacs 29, but not in the current emacs-30 branch. I think I also have libtree-sitter-cpp version 0.22.2, but I also tested with 0.22.3 and I see no problem there, either (with Emacs 30). So I wonder why you see this in Emacs 30.