all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
@ 2022-12-30 12:24 Alan Mackenzie
  2022-12-31  1:02 ` Yuan Fu
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Mackenzie @ 2022-12-30 12:24 UTC (permalink / raw)
  To: 60427

Hello, Emacs.

In the emacs-29 branch, with the latest commit being:

commit 558b59d81b938fc434e62523106360b9704c88e2 (HEAD -> emacs-29, origin/emacs-29, origin/HEAD)
Author: Yuan Fu <casouri@gmail.com>
Date:   Thu Dec 29 11:52:06 2022 -0800

    Add color fontification in css-ts-mode (bug#60405)

:
(i) emacs -Q
(ii) (setq backtrace-on-redisplay-error t)
(iii) C-x b string.cc <RET>
(iv) M-x c++-ts-mode <RET>
(v) Type "char" (without the quote marks).

This throws an exception in the redisplay code.  The backtrace in the
*Redisplay-trace* buffer is:

Error: treesit-query-error ("Node type error at" 195 "Debug the query with `treesit-query-validate'")
  debug-early-backtrace()
  debug-early(error (treesit-query-error "Node type error at" 195 "Debug the query with `treesit-query-validate'"))
  treesit-font-lock-fontify-region(1 5 nil)
  font-lock-default-fontify-region(1 5 nil)
  font-lock-fontify-region(1 5)
  #f(compiled-function (fun) #<bytecode -0x156ee3e72a1d5e83>)(font-lock-fontify-region)
  jit-lock--run-functions(1 5)
  jit-lock-fontify-now(1 5)
  jit-lock-function(1)
  redisplay_internal\ \(C\ function\)()

..  That this insertion causes an exception is clearly a bug.

But the contents of the backtrace seem to me to be less helpful than they
might be.  What does the "the" in "the query" refer to?  There is no
referent yet established.  What does the 195 refer to?  It clearly isn't
a buffer position, which is what it would mean in lots of other Emacs
error messages.

Just as a matter of interest, in c-ts-mode, the above actions run without
problem.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-30 12:24 bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay Alan Mackenzie
@ 2022-12-31  1:02 ` Yuan Fu
  2022-12-31  6:42   ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Yuan Fu @ 2022-12-31  1:02 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 60427



> On Dec 30, 2022, at 4:24 AM, Alan Mackenzie <acm@muc.de> wrote:
> 
> Hello, Emacs.
> 
> In the emacs-29 branch, with the latest commit being:
> 
> commit 558b59d81b938fc434e62523106360b9704c88e2 (HEAD -> emacs-29, origin/emacs-29, origin/HEAD)
> Author: Yuan Fu <casouri@gmail.com>
> Date:   Thu Dec 29 11:52:06 2022 -0800
> 
>    Add color fontification in css-ts-mode (bug#60405)
> 
> :
> (i) emacs -Q
> (ii) (setq backtrace-on-redisplay-error t)
> (iii) C-x b string.cc <RET>
> (iv) M-x c++-ts-mode <RET>
> (v) Type "char" (without the quote marks).
> 
> This throws an exception in the redisplay code.  The backtrace in the
> *Redisplay-trace* buffer is:
> 
> Error: treesit-query-error ("Node type error at" 195 "Debug the query with `treesit-query-validate'")
>  debug-early-backtrace()
>  debug-early(error (treesit-query-error "Node type error at" 195 "Debug the query with `treesit-query-validate'"))
>  treesit-font-lock-fontify-region(1 5 nil)
>  font-lock-default-fontify-region(1 5 nil)
>  font-lock-fontify-region(1 5)
>  #f(compiled-function (fun) #<bytecode -0x156ee3e72a1d5e83>)(font-lock-fontify-region)
>  jit-lock--run-functions(1 5)
>  jit-lock-fontify-now(1 5)
>  jit-lock-function(1)
>  redisplay_internal\ \(C\ function\)()
> 
> ..  That this insertion causes an exception is clearly a bug.
> 
> But the contents of the backtrace seem to me to be less helpful than they
> might be.  What does the "the" in "the query" refer to?  There is no
> referent yet established.  What does the 195 refer to?  It clearly isn't
> a buffer position, which is what it would mean in lots of other Emacs
> error messages.
> 
> Just as a matter of interest, in c-ts-mode, the above actions run without
> problem.

Thank you! I couldn’t reproduce it on the latest trunk, even though I checked that there isn’t any relevant change between that commit and the latest one. I made a small modification to treesit.c so now the signal will contain the source of the query that caused the error. Could you try again with trunk and show me the backtrace? This time it should contain the problematic query.

Yuan




^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31  1:02 ` Yuan Fu
@ 2022-12-31  6:42   ` Eli Zaretskii
  2022-12-31  6:55     ` Yuan Fu
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2022-12-31  6:42 UTC (permalink / raw)
  To: Yuan Fu; +Cc: acm, 60427

> Cc: 60427@debbugs.gnu.org
> From: Yuan Fu <casouri@gmail.com>
> Date: Fri, 30 Dec 2022 17:02:36 -0800
> 
> Thank you! I couldn’t reproduce it on the latest trunk

AFAIU, the report was about the emacs-29 branch, not about the master
branch.  So what did you mean by "latest trunk" above?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31  6:42   ` Eli Zaretskii
@ 2022-12-31  6:55     ` Yuan Fu
  2022-12-31 10:29       ` Alan Mackenzie
  0 siblings, 1 reply; 13+ messages in thread
From: Yuan Fu @ 2022-12-31  6:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: acm, 60427



> On Dec 30, 2022, at 10:42 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Cc: 60427@debbugs.gnu.org
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 30 Dec 2022 17:02:36 -0800
>> 
>> Thank you! I couldn’t reproduce it on the latest trunk
> 
> AFAIU, the report was about the emacs-29 branch, not about the master
> branch.  So what did you mean by "latest trunk" above?

Sorry, imprecise wording, I mean latest emacs-29 :-)

Yuan




^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31  6:55     ` Yuan Fu
@ 2022-12-31 10:29       ` Alan Mackenzie
  2022-12-31 11:02         ` Eli Zaretskii
                           ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Alan Mackenzie @ 2022-12-31 10:29 UTC (permalink / raw)
  To: Yuan Fu; +Cc: acm, Eli Zaretskii, 60427

Hello, Yuan.

On Fri, Dec 30, 2022 at 22:55:41 -0800, Yuan Fu wrote:


> > On Dec 30, 2022, at 10:42 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> >> Cc: 60427@debbugs.gnu.org
> >> From: Yuan Fu <casouri@gmail.com>
> >> Date: Fri, 30 Dec 2022 17:02:36 -0800

> >> Thank you! I couldn’t reproduce it on the latest trunk

> > AFAIU, the report was about the emacs-29 branch, not about the master
> > branch.  So what did you mean by "latest trunk" above?

> Sorry, imprecise wording, I mean latest emacs-29 :-)

I've just downloaded the latest commits in the emacs-29 branch,
bootstrapped, and I still see the problem, both in X GUI and on a Linux
console.  Just as a matter of interest, I get the error after typing the
h in "char", so the problem would appear not to be related to the
specific character string "char".

As you mentioned, the backtrace now looks a bit different, namely:

Error: treesit-query-error ("Node type error at" 195 "[\"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"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\" \"virtual\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-
 lock-keyword-face (this) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'")
  debug-early-backtrace()
  debug-early(error (treesit-query-error "Node type error at" 195 "[\"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"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\" \"declty\pe\" \"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\" \"virtual\" \"xor\" \"xor_eq\"] @font-lock-keyword-face 
 (auto) @font-lock-keyword-face (this) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'"))
  treesit-font-lock-fontify-region(1 5 nil)
  font-lock-default-fontify-region(1 5 nil)
  font-lock-fontify-region(1 5)
  #f(compiled-function (fun) #<bytecode -0x156e29a3e4e81ac3>)(font-lock-fontify-region)
  jit-lock--run-functions(1 5)
  jit-lock-fontify-now(1 5)
  jit-lock-function(1)
  redisplay_internal\ \(C\ function\)()


I forgot to give my configuration arguments, maybe that has something to
do with it.  They're:

  ./configure --with-gif=no --with-tiff=no --with-gpm --with-native-compilation

..

> Yuan

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31 10:29       ` Alan Mackenzie
@ 2022-12-31 11:02         ` Eli Zaretskii
  2023-01-01 19:31           ` Alan Mackenzie
  2022-12-31 11:05         ` Eli Zaretskii
  2022-12-31 22:11         ` Yuan Fu
  2 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2022-12-31 11:02 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: casouri, 60427

> Date: Sat, 31 Dec 2022 10:29:21 +0000
> Cc: Eli Zaretskii <eliz@gnu.org>, 60427@debbugs.gnu.org, acm@muc.de
> From: Alan Mackenzie <acm@muc.de>
> 
> I've just downloaded the latest commits in the emacs-29 branch,
> bootstrapped, and I still see the problem, both in X GUI and on a Linux
> console.  Just as a matter of interest, I get the error after typing the
> h in "char", so the problem would appear not to be related to the
> specific character string "char".

I cannot reproduce this with the current emacs-29 branch, neither with
native-compilation nor without it.  I also tried in a -nw session, and
couldn't reproduce there as well.

How did you get and build the C++ grammar file for tree-sitter?  If
you cloned their repository, what is the last commit from which you
produced the shared library file?

And which version of the tree-sitter library are you using?

Finally, is the recipe you posted complete? are you sure you did
nothing else since starting Emacs?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31 10:29       ` Alan Mackenzie
  2022-12-31 11:02         ` Eli Zaretskii
@ 2022-12-31 11:05         ` Eli Zaretskii
  2022-12-31 22:06           ` Yuan Fu
  2022-12-31 22:11         ` Yuan Fu
  2 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2022-12-31 11:05 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: acm, casouri, 60427

> Date: Sat, 31 Dec 2022 10:29:21 +0000
> Cc: Eli Zaretskii <eliz@gnu.org>, 60427@debbugs.gnu.org, acm@muc.de
> From: Alan Mackenzie <acm@muc.de>
> 
> As you mentioned, the backtrace now looks a bit different, namely:
> 
> Error: treesit-query-error ("Node type error at" 195 "[\"break\" \"case\" \"co

Yuan, what is "195" in this error message?  According to the source
code, its is "error_offset+1", but what is that?  If it's a buffer
position, then how come we see 195 when the buffer has only "char" in
it?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31 11:05         ` Eli Zaretskii
@ 2022-12-31 22:06           ` Yuan Fu
  2023-01-01  6:26             ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Yuan Fu @ 2022-12-31 22:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Alan Mackenzie, 60427



> On Dec 31, 2022, at 3:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Date: Sat, 31 Dec 2022 10:29:21 +0000
>> Cc: Eli Zaretskii <eliz@gnu.org>, 60427@debbugs.gnu.org, acm@muc.de
>> From: Alan Mackenzie <acm@muc.de>
>> 
>> As you mentioned, the backtrace now looks a bit different, namely:
>> 
>> Error: treesit-query-error ("Node type error at" 195 "[\"break\" \"case\" \"co
> 
> Yuan, what is "195" in this error message?  According to the source
> code, its is "error_offset+1", but what is that?  If it's a buffer
> position, then how come we see 195 when the buffer has only "char" in
> it?

It is the position of the error in the query string. Any suggestion to make that clearer in the message? Maybe “Node type error in the query string at”?

Yuan




^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31 10:29       ` Alan Mackenzie
  2022-12-31 11:02         ` Eli Zaretskii
  2022-12-31 11:05         ` Eli Zaretskii
@ 2022-12-31 22:11         ` Yuan Fu
  2023-01-01  6:22           ` Eli Zaretskii
  2 siblings, 1 reply; 13+ messages in thread
From: Yuan Fu @ 2022-12-31 22:11 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Eli Zaretskii, 60427



> On Dec 31, 2022, at 2:29 AM, Alan Mackenzie <acm@muc.de> wrote:
> 
> Hello, Yuan.
> 
> On Fri, Dec 30, 2022 at 22:55:41 -0800, Yuan Fu wrote:
> 
> 
>>> On Dec 30, 2022, at 10:42 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>>>> Cc: 60427@debbugs.gnu.org
>>>> From: Yuan Fu <casouri@gmail.com>
>>>> Date: Fri, 30 Dec 2022 17:02:36 -0800
> 
>>>> Thank you! I couldn’t reproduce it on the latest trunk
> 
>>> AFAIU, the report was about the emacs-29 branch, not about the master
>>> branch.  So what did you mean by "latest trunk" above?
> 
>> Sorry, imprecise wording, I mean latest emacs-29 :-)
> 
> I've just downloaded the latest commits in the emacs-29 branch,
> bootstrapped, and I still see the problem, both in X GUI and on a Linux
> console.  Just as a matter of interest, I get the error after typing the
> h in "char", so the problem would appear not to be related to the
> specific character string "char".
> 
> As you mentioned, the backtrace now looks a bit different, namely:
> 
> Error: treesit-query-error ("Node type error at" 195 "[\"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"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\" \"virtual\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'")
>  debug-early-backtrace()
>  debug-early(error (treesit-query-error "Node type error at" 195 "[\"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"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\" \"declty\pe\" \"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\" \"virtual\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'"))
>  treesit-font-lock-fontify-region(1 5 nil)
>  font-lock-default-fontify-region(1 5 nil)
>  font-lock-fontify-region(1 5)
>  #f(compiled-function (fun) #<bytecode -0x156e29a3e4e81ac3>)(font-lock-fontify-region)
>  jit-lock--run-functions(1 5)
>  jit-lock-fontify-now(1 5)
>  jit-lock-function(1)
>  redisplay_internal\ \(C\ function\)()
> 
> 
> I forgot to give my configuration arguments, maybe that has something to
> do with it.  They're:
> 
>  ./configure --with-gif=no --with-tiff=no --with-gpm --with-native-compilation
> 
> ..

As Eli observed, this seems like a mismatch between the C++ language grammar you used and the queries used by c++-ts-mode. We need to pin down or declare the version of the language grammar a major mode is written on. Maybe in NEWS file?

Yuan




^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31 22:11         ` Yuan Fu
@ 2023-01-01  6:22           ` Eli Zaretskii
  0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2023-01-01  6:22 UTC (permalink / raw)
  To: Yuan Fu; +Cc: acm, 60427

> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 31 Dec 2022 14:11:03 -0800
> Cc: Eli Zaretskii <eliz@gnu.org>,
>  60427@debbugs.gnu.org
> 
> As Eli observed, this seems like a mismatch between the C++ language grammar you used and the queries used by c++-ts-mode. We need to pin down or declare the version of the language grammar a major mode is written on. Maybe in NEWS file?

I just asked what version of the grammar and library Alan uses.

If we know which version is required. can we devise a test for it?
Then we could run that test when the language grammar is first loaded,
and reject versions that are not suitable.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31 22:06           ` Yuan Fu
@ 2023-01-01  6:26             ` Eli Zaretskii
  0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2023-01-01  6:26 UTC (permalink / raw)
  To: Yuan Fu; +Cc: acm, 60427

> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 31 Dec 2022 14:06:20 -0800
> Cc: Alan Mackenzie <acm@muc.de>,
>  60427@debbugs.gnu.org
> 
> > On Dec 31, 2022, at 3:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > 
> >> Date: Sat, 31 Dec 2022 10:29:21 +0000
> >> Cc: Eli Zaretskii <eliz@gnu.org>, 60427@debbugs.gnu.org, acm@muc.de
> >> From: Alan Mackenzie <acm@muc.de>
> >> 
> >> As you mentioned, the backtrace now looks a bit different, namely:
> >> 
> >> Error: treesit-query-error ("Node type error at" 195 "[\"break\" \"case\" \"co
> > 
> > Yuan, what is "195" in this error message?  According to the source
> > code, its is "error_offset+1", but what is that?  If it's a buffer
> > position, then how come we see 195 when the buffer has only "char" in
> > it?
> 
> It is the position of the error in the query string. Any suggestion to make that clearer in the message? Maybe “Node type error in the query string at”?

And the "query string" is that long string enclosed in [] brackets?

"Node type error at query string position" is the best I can come up
with, but the problem is that figuring out where is that is not easy,
given all the backslashes.  Not sure what we can do about that,
though.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2022-12-31 11:02         ` Eli Zaretskii
@ 2023-01-01 19:31           ` Alan Mackenzie
  2023-01-01 20:20             ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Mackenzie @ 2023-01-01 19:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: acm, casouri, 60427

Hello, Eli.

On Sat, Dec 31, 2022 at 13:02:26 +0200, Eli Zaretskii wrote:
> > Date: Sat, 31 Dec 2022 10:29:21 +0000
> > Cc: Eli Zaretskii <eliz@gnu.org>, 60427@debbugs.gnu.org, acm@muc.de
> > From: Alan Mackenzie <acm@muc.de>

> > I've just downloaded the latest commits in the emacs-29 branch,
> > bootstrapped, and I still see the problem, both in X GUI and on a Linux
> > console.  Just as a matter of interest, I get the error after typing the
> > h in "char", so the problem would appear not to be related to the
> > specific character string "char".

> I cannot reproduce this with the current emacs-29 branch, neither with
> native-compilation nor without it.  I also tried in a -nw session, and
> couldn't reproduce there as well.

> How did you get and build the C++ grammar file for tree-sitter?  If
> you cloned their repository, what is the last commit from which you
> produced the shared library file?

I installed it using my GNU/Linux distribution's package manager.
That's Gentoo.

> And which version of the tree-sitter library are you using?

I've got tree-sitter-cpp 0.20.0.  In /usr/lib64, I get:

    /usr/lib64/libtree-sitter-cpp.so -> libtree-sitter-cpp.so.13

> Finally, is the recipe you posted complete? are you sure you did
> nothing else since starting Emacs?

Yes, it's complete.  I just tried following my own recipe exactly, and
it produced the unwanted results described.

The feeling at the moment is that that libtree-sitter-cpp.so.13 isn't
compatible with Emacs 29.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
  2023-01-01 19:31           ` Alan Mackenzie
@ 2023-01-01 20:20             ` Eli Zaretskii
  0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2023-01-01 20:20 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: casouri, 60427

> Date: Sun, 1 Jan 2023 19:31:26 +0000
> Cc: casouri@gmail.com, 60427@debbugs.gnu.org, acm@muc.de
> From: Alan Mackenzie <acm@muc.de>
> 
> > How did you get and build the C++ grammar file for tree-sitter?  If
> > you cloned their repository, what is the last commit from which you
> > produced the shared library file?
> 
> I installed it using my GNU/Linux distribution's package manager.
> That's Gentoo.
> 
> > And which version of the tree-sitter library are you using?
> 
> I've got tree-sitter-cpp 0.20.0.  In /usr/lib64, I get:
> 
>     /usr/lib64/libtree-sitter-cpp.so -> libtree-sitter-cpp.so.13

That's more than a year ago (Oct 2021), if my reading of their Git
logs is correct.  Please try a newer version, perhaps from their Git
repository, if you can.

> The feeling at the moment is that that libtree-sitter-cpp.so.13 isn't
> compatible with Emacs 29.

Could be.  But we won't know for sure until you try a newer version of
the grammar library.





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-01-01 20:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-30 12:24 bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay Alan Mackenzie
2022-12-31  1:02 ` Yuan Fu
2022-12-31  6:42   ` Eli Zaretskii
2022-12-31  6:55     ` Yuan Fu
2022-12-31 10:29       ` Alan Mackenzie
2022-12-31 11:02         ` Eli Zaretskii
2023-01-01 19:31           ` Alan Mackenzie
2023-01-01 20:20             ` Eli Zaretskii
2022-12-31 11:05         ` Eli Zaretskii
2022-12-31 22:06           ` Yuan Fu
2023-01-01  6:26             ` Eli Zaretskii
2022-12-31 22:11         ` Yuan Fu
2023-01-01  6:22           ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.