unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Daniel Martín" <mardani29@yahoo.es>,
	"Yuan Fu" <casouri@gmail.com>,
	"Theodor Thornhill" <theo@thornhill.no>
Cc: 61356@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	[thread overview]
Message-ID: <83a61nm96q.fsf@gnu.org> (raw)
In-Reply-To: <m1v8kdyv6u.fsf@yahoo.es> (bug-gnu-emacs@gnu.org)

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





  reply	other threads:[~2023-02-09 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1v8kdyv6u.fsf.ref@yahoo.es>
2023-02-07 22:20 ` bug#61356: 29.0.60; wrong-type-argument in treesit-indent-region when indenting a C buffer Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 10:20   ` Eli Zaretskii [this message]
2023-02-25  2:24     ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-25  5:21       ` Yuan Fu
2023-09-04 19:47         ` stefankangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a61nm96q.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61356@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=mardani29@yahoo.es \
    --cc=theo@thornhill.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).