Subject: bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.

From: Alan Mackenzie <[email-masked]>
Date: Sun, 1 Jan 2023 19:31:26 +0000

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 <[email-masked]>, [email-masked], [email-masked]
> > From: Alan Mackenzie <[email-masked]>

> > 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).