GNU bug report logs - #73191
30.0.91; missing some keywords in c++-ts-mode

Previous Next

Package: emacs;

Reported by: Yang Yingchao <yang.yingchao <at> qq.com>

Date: Thu, 12 Sep 2024 06:36:01 UTC

Severity: normal

Found in version 30.0.91

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73191 in the body.
You can then email your comments to 73191 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#73191; Package emacs. (Thu, 12 Sep 2024 06:36:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yang Yingchao <yang.yingchao <at> qq.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 12 Sep 2024 06:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Yang Yingchao <yang.yingchao <at> qq.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.91; missing some keywords in c++-ts-mode
Date: Thu, 12 Sep 2024 14:33:50 +0800


Some keywords are missing in `c++-ts-mode`, compared to `c++-mode` (defined
in `cc-langs.el`), notably: "virtual," "thread_local," and maybe others.


Regargs
yang





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73191; Package emacs. (Thu, 12 Sep 2024 06:42:02 GMT) Full text and rfc822 format available.

Message #8 received at 73191 <at> debbugs.gnu.org (full text, mbox):

From: Yang Yingchao <yang.yingchao <at> qq.com>
To: help-debbugs <at> gnu.org (GNU bug Tracking System)
Cc: 73191 <at> debbugs.gnu.org
Subject: Re: bug#73191: Acknowledgement (30.0.91; missing some keywords in
 c++-ts-mode)
Date: Thu, 12 Sep 2024 14:40:26 +0800
On Thu, Sep 12 2024, GNU bug Tracking System wrote:

Update: `virtual` works fine, only `thread_local` is not highlighted...

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  bug-gnu-emacs <at> gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 73191 <at> debbugs.gnu.org.
>
> Please do not send mail to help-debbugs <at> gnu.org unless you wish
> to report a problem with the Bug-tracking system.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73191; Package emacs. (Sat, 14 Sep 2024 10:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 73191 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yang Yingchao <yang.yingchao <at> qq.com>, Yuan Fu <casouri <at> gmail.com>
Cc: 73191 <at> debbugs.gnu.org
Subject: Re: bug#73191: Acknowledgement (30.0.91;
 missing some keywords in c++-ts-mode)
Date: Sat, 14 Sep 2024 13:05:20 +0300
> Date: Thu, 12 Sep 2024 14:40:26 +0800
> From:  Yang Yingchao via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> On Thu, Sep 12 2024, GNU bug Tracking System wrote:
> 
> Update: `virtual` works fine, only `thread_local` is not highlighted...

Yuan,

Could you please look at this?

It sounds like we lack "thread_local" (and also "virtual"?) in
c-ts-mode--keywords.  But when I tried to add them I found a more
serious problem: with the current C++ grammar library I see the
following messages in *Messages*:

  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'")

Could you please look at this and fix it ASAP, since this is affecting
the release branch?

TIA




Reply sent to Yuan Fu <casouri <at> gmail.com>:
You have taken responsibility. (Sat, 14 Sep 2024 18:13:01 GMT) Full text and rfc822 format available.

Notification sent to Yang Yingchao <yang.yingchao <at> qq.com>:
bug acknowledged by developer. (Sat, 14 Sep 2024 18:13:02 GMT) Full text and rfc822 format available.

Message #16 received at 73191-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Yang Yingchao <yang.yingchao <at> qq.com>, 73191-done <at> debbugs.gnu.org
Subject: Re: bug#73191: Acknowledgement (30.0.91; missing some keywords in
 c++-ts-mode)
Date: Sat, 14 Sep 2024 11:11:19 -0700

> On Sep 14, 2024, at 3:05 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> Date: Thu, 12 Sep 2024 14:40:26 +0800
>> From:  Yang Yingchao via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> On Thu, Sep 12 2024, GNU bug Tracking System wrote:
>> 
>> Update: `virtual` works fine, only `thread_local` is not highlighted...
> 
> Yuan,
> 
> Could you please look at this?
> 
> It sounds like we lack "thread_local" (and also "virtual"?) in
> c-ts-mode--keywords.  But when I tried to add them I found a more
> serious problem: with the current C++ grammar library I see the
> following messages in *Messages*:
> 
>  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'")
> 
> Could you please look at this and fix it ASAP, since this is affecting
> the release branch?
> 
> TIA

Yeah, sorry that I missed this report. And lol, tree-sitter-cpp changed “virtual” to (virtual) in May and then changed it back a few days ago.

I added “thread_local" keyword and added logic to use (virtual) or “virtual” depending on the grammar.

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73191; Package emacs. (Sat, 14 Sep 2024 19:07:02 GMT) Full text and rfc822 format available.

Message #19 received at 73191 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: yang.yingchao <at> qq.com, 73191 <at> debbugs.gnu.org
Subject: Re: bug#73191: Acknowledgement (30.0.91; missing some keywords in
 c++-ts-mode)
Date: Sat, 14 Sep 2024 22:06:29 +0300
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Sat, 14 Sep 2024 11:11:19 -0700
> Cc: Yang Yingchao <yang.yingchao <at> qq.com>,
>  73191-done <at> debbugs.gnu.org
> 
> >  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'")
> > 
> > Could you please look at this and fix it ASAP, since this is affecting
> > the release branch?
> > 
> > TIA
> 
> Yeah, sorry that I missed this report. And lol, tree-sitter-cpp changed “virtual” to (virtual) in May and then changed it back a few days ago.
> 
> I added “thread_local" keyword and added logic to use (virtual) or “virtual” depending on the grammar.

Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 13 Oct 2024 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.