From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#64830: 30.0.50 C++ treesitter mode no coloration Date: Sun, 25 Aug 2024 12:08:33 +0000 Message-ID: References: <86o75s5pu0.fsf@gnu.org> <86mslc5plq.fsf@gnu.org> <86h6bk5nnu.fsf@gnu.org> <3C502C2B-829D-42C3-A74A-2A783F5880CE@gmail.com> <86a5h1mcbw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64830@debbugs.gnu.org, casouri@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 25 14:09: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 1siC3v-0007TR-TF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Aug 2024 14:09:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1siC3Y-0004Dz-UV; Sun, 25 Aug 2024 08:09:17 -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 1siC3V-0004Do-Qv for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2024 08:09:13 -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 1siC3V-0002u8-HE for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2024 08:09:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:In-Reply-To:MIME-Version:References:Date:To:Subject; bh=HCWweAoarRaUGdX/kLBMbTkiKp5NTXACV7LhRZit0xI=; b=HOLyWwxqwPWUTW+k3er55ZOb2YIoetpNhzvISBXhjk9bnYNdRoOp0+sEPoEpEQt0ArtUzhvAxWkU9y5IvZGTbf0JDUsUBKcPGWTLmy1e1mhhh/BA0ena5v5GHR5te86hYEn/OPK2/TLhtAvpgbJYAI6ZJAisyFPY2U0TIXK/0KEqllYUecQPl47Scuwd8L5YzHfNcl9V9VSpM7xWDEImTBdNv1+Q2xZYg+jo0Lt1N2JjM64OXw1G/+ZhSul8AsBbTPWI/iuWkZCGsRdPtuih2e3G59l7Bee4hYfgE9UiyLCMryPBb+jHxO6Jo6oPdJQ96bfvfkhwdjDkilROxQ6SpA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1siC4I-0003gJ-2o for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2024 08:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Aug 2024 12:10:02 +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.172458777314108 (code B ref 64830); Sun, 25 Aug 2024 12:10:02 +0000 Original-Received: (at 64830) by debbugs.gnu.org; 25 Aug 2024 12:09:33 +0000 Original-Received: from localhost ([127.0.0.1]:42316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siC3p-0003fT-6X for submit@debbugs.gnu.org; Sun, 25 Aug 2024 08:09:33 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:45345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siC3n-0003fB-1K for 64830@debbugs.gnu.org; Sun, 25 Aug 2024 08:09:32 -0400 Original-Received: (qmail 55020 invoked by uid 3782); 25 Aug 2024 14:08:34 +0200 Original-Received: from muc.de (p4fe152fc.dip0.t-ipconnect.de [79.225.82.252]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 25 Aug 2024 14:08:34 +0200 Original-Received: (qmail 17022 invoked by uid 1000); 25 Aug 2024 12:08:33 -0000 Content-Disposition: inline In-Reply-To: <86a5h1mcbw.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:290734 Archived-At: Hello, Eli. On Sun, Aug 25, 2024 at 07:54:43 +0300, Eli Zaretskii wrote: > > Date: Sun, 25 Aug 2024 02:19:28 +0000 > > Cc: Eli Zaretskii , 64830@debbugs.gnu.org > > From: Alan Mackenzie > > I've now applied your patch, the one whose first hunk's header is: > > @@ -537,6 +537,16 @@ c-ts-mode--top-level-label-matcher > > , but it unfortunately doesn't solve the bug. On templates-21.cc, one of > > the test files from CC Mode, on doing M-x c++-ts-mode, there is no > > fontification at all. In *Messages* we have > > 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'") > > That "Node type error at" 677 isn't a buffer position - the buffer is > > only 325 characters long. > > Is there anything else I could do to help, here? > AFAIR, you still didn't respond to my questions about the version of > the C++ grammar library you are using, nor tried to upgrade to the > latest version of that grammar library. I thought I said that right at the beginning, in my first post on this thread. I'm using tree-sitter-cpp version 0.22.2, and version 0.22.6 of tree-sitter itself. > FTR, I'm using tree-sitter version 0.20.8 and grammar library from > their Git repository as of June 17 (this is version 0.22.2 of the > grammar library with a couple of changes after that version). I have > no problems with displaying C++ files whatsoever, and *Messages* is > clean. I also tried the latest version of the grammar library > (0.22.3), and didn't see any problems there, either. I haven't been able to find a download facility on the tree-sitter-cpp page at Github. Did you download a ready built version of tree-sitter-cpp 0.22.3, or did you have to build it yourself from sources? -- Alan Mackenzie (Nuremberg, Germany).