Subject: bug#71680: closed (Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 22 Jun 2024 18:16:02 +0000

Your bug report

#71518: c++-ts-mode with latest tree-sitter-cpp grammar barfs on "virtual"

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
71518: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71518
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode
From: Eli Zaretskii <[email-masked]>
To: Vincenzo Pupillo <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sat, 22 Jun 2024 21:15:04 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Vincenzo Pupillo <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Sat, 22 Jun 2024 19:59:42 +0200
> 
> In data sabato 22 giugno 2024 19:03:43 CEST, Eli Zaretskii ha scritto:
> > > Cc: [email-masked], [email-masked]
> > > Date: Sat, 22 Jun 2024 19:56:34 +0300
> > > From: Eli Zaretskii <[email-masked]>
> > > 
> > > Hmm... I still see an error message in *Messages* after installing
> > > 
> > > this (I have grammar library version 0.22.2):
> > >   Error during redisplay: (jit-lock-function 1) signaled
> > >   (treesit-query-error "Node type error at" 2 "(virtual)
> > >   @font-lock-keyword-face [\"auto\" \"_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\"] @font-lock-keyword-face" "Debug the query with
> > >   `treesit-query-validate'")> 
> > > Any ideas or suggestions?  "virtual" is highlighted, though, so I
> > > guess this is a matter of suppressing the errors or something?
> > 
> > E.g., you can see in go-ts-mode.el how the code probes whether a
> > certain query is supported, and uses it only if it is.
> Sorry, I only tested with .cpp files.
> The rule had to be protected by (when (eq mode 'cpp)...
> 
> Now I have tested this with *.c and *.h as well, with old and new grammar.

Thanks, installed on master, and closing the bug.

Subject: c++-ts-mode with latest tree-sitter-cpp grammar barfs on "virtual"
From: Daniel Colascione <[email-masked]>
To: [email-masked]
Date: Thu, 20 Jun 2024 12:33:37 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

When using latest master Emacs with latest release tree-sitter and
latest version of tree-sitter-cpp, we get an error redisplay in
redisplay complaining that the "virtual" keyword in c-ts-mode--keywords
is an invalid query.  Removing "virtual" from the list in c-ts-mode.el
resolves the problem, but of course, results in the "virtual" keyword
not being fontified as a keyword.