GNU bug report logs - #61356
29.0.60; wrong-type-argument in treesit-indent-region when indenting a C buffer

Previous Next

Package: emacs;

Reported by: Daniel Martín <mardani29 <at> yahoo.es>

Date: Tue, 7 Feb 2023 22:21:02 UTC

Severity: normal

Found in version 29.0.60

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Martín <mardani29 <at> yahoo.es>, Yuan Fu <casouri <at> gmail.com>, Theodor Thornhill <theo <at> thornhill.no>
Cc: 61356 <at> debbugs.gnu.org
Subject: bug#61356: 29.0.60; wrong-type-argument in treesit-indent-region when indenting a C buffer
Date: Thu, 09 Feb 2023 12:20:45 +0200
> Date: Tue, 07 Feb 2023 23:20:09 +0100
> From:  Daniel Martín via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 
> Steps to reproduce the problem:
> 
> emacs -Q
> C-x C-f emacs/src/xdisp.c RET
> M-x c-ts-mode RET
> C-x h
> TAB
> 
> Expected result:
> 
> The buffer is reindented.
> 
> Actual results:
> 
> The operation fails with this error:
> 
> Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
>   treesit-indent-region(1 1214226)
>   indent-region(1 1214226)
>   indent-for-tab-command(nil)
>   funcall-interactively(indent-for-tab-command nil)
>   call-interactively(indent-for-tab-command nil nil)
>   command-execute(indent-for-tab-command)

Thank you for your report.

Yuan and Theo, could you please look into this?  I briefly stepped
through the code involved in the problem, and it sounds like it makes
some assumptions regarding the nodes which are not necessarily true in
Real Life.




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

Previous Next


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