From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83a61nm96q.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28971"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61356@debbugs.gnu.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= , Yuan Fu , Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 09 11:21:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQ43J-0007ML-KW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 11:21:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ435-00063A-OZ; Thu, 09 Feb 2023 05:21:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ433-00062h-VJ for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 05:21:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQ433-0006cp-Mx for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 05:21:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQ433-0002hV-Ik for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 05:21:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Feb 2023 10:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61356 X-GNU-PR-Package: emacs Original-Received: via spool by 61356-submit@debbugs.gnu.org id=B61356.167593803810341 (code B ref 61356); Thu, 09 Feb 2023 10:21:01 +0000 Original-Received: (at 61356) by debbugs.gnu.org; 9 Feb 2023 10:20:38 +0000 Original-Received: from localhost ([127.0.0.1]:57586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ42g-0002gi-Eg for submit@debbugs.gnu.org; Thu, 09 Feb 2023 05:20:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ42d-0002gU-W3 for 61356@debbugs.gnu.org; Thu, 09 Feb 2023 05:20:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ42Y-0006XN-5I; Thu, 09 Feb 2023 05:20:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=i/yCkcVN7+B1qjt9p3GJS5UnVjcT1x/c2dZ80Ml8iKE=; b=I4mdCMMgtJrUZiSCu4bZ r9WOnVpNcWY+WiLXFydMY46w74gIuilaxWKUZw+tk1Ees3FR/Vpd07kTzL7VO4dm+OioOOEkkKx7e DSDcdfBb+NDOfC789zCmBuuMZybeGqKeGGaette6cj8hIIZYOzTKtEIc6fFuEi9+Rs6fuPaLpkOaF fBFnjGJWrAizh8YZsUnTjpc2/j/tVVcUqO94S1mHMYrr5+BhOdc/B8n6MBktxvZ96ubWEThE5XH3s DCQMy4eY9AVTArN58txMDH0iRLJs5j59k9mn2Pt3mQlAM+veG5GSqOAr0SHtSt7+uOtcDipkrVyJa zxcYKwNY0afT6Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ42S-0003mr-6K; Thu, 09 Feb 2023 05:20:29 -0500 In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255205 Archived-At: > 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" > > > 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.