GNU bug report logs - #65810
30.0.50; C-M-f and related functions error out in c++-ts-mode

Previous Next

Package: emacs;

Reported by: João Távora <joaotavora <at> gmail.com>

Date: Thu, 7 Sep 2023 17:46:02 UTC

Severity: normal

Found in version 30.0.50

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

Bug is archived. No further changes may be made.

Full log


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

From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: João Távora <joaotavora <at> gmail.com>,
 65810-done <at> debbugs.gnu.org
Subject: Re: bug#65810: 30.0.50; C-M-f and related functions error out in
 c++-ts-mode
Date: Thu, 7 Sep 2023 16:12:13 -0700

> On Sep 7, 2023, at 11:09 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> From: João Távora <joaotavora <at> gmail.com>
>> Cc: eliz <at> gnu.org
>> Date: Thu, 07 Sep 2023 18:48:07 +0100
>> 
>> Now just type C-M-f or any C-M-something command.
>> 
>>  Debugger entered--Lisp error: (treesit-invalid-predicate nil)
>>    treesit-node-match-p(#<treesit-node "{" in 1-2> sexp t)
>>    #f(compiled-function (node) #<bytecode 0x1a160a6a590699e2>)(#<treesit-node "{" in 1-2>)
>>    treesit-node-match-p(#<treesit-node "{" in 1-2> #f(compiled-function (node) #<bytecode 0x1a160a6a590699e2>) t)
>>    treesit-node-top-level(#<treesit-node "{" in 1-2> #f(compiled-function (node) #<bytecode 0x1a160a6a590699e2>) t)
>>    treesit--things-around(5 sexp)
>>    treesit--navigate-thing(5 -1 beg sexp restricted)
>>    treesit-beginning-of-thing(sexp 1 restricted)
>>    treesit-forward-sexp(-1)
>>    forward-sexp(-1 nil)
>>    forward-sexp(-1 5)
>>    backward-sexp(1 5)
>>    funcall-interactively(backward-sexp 1 5)
>>    call-interactively(backward-sexp nil nil)
>>    command-execute(backward-sexp)
>> 
>> simple.cpp can be any C++ file, from a simple
>> 
>>   int main() {return 0;}
>> 
>> to a completely empty file.
> 
> With the above sample file I can indeed reproduce the error.  But not
> with real-life files I tried, where functions are larger and there's
> usually more than one function.
> 
> Yuan, could you please look into this?

That’s due to some new stuff I added recently. I’ve pushed a fix to master. Sorry for the chaos guys :-(

Yuan



This bug report was last modified 1 year and 252 days ago.

Previous Next


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