From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eason Huang Newsgroups: gmane.emacs.bugs Subject: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled Date: Fri, 25 Nov 2022 20:56:36 +0800 Message-ID: References: <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32048"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Yuan Fu , 59498@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 25 13:57:13 2022 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 1oyYGX-00089E-Dn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Nov 2022 13:57:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyYGO-0000iy-Iz; Fri, 25 Nov 2022 07:57:04 -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 1oyYGM-0000iV-Iv for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 07:57: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 1oyYGM-0006oD-9U for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 07:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyYGM-0004fI-61 for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 07:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eason Huang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Nov 2022 12:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59498 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59498-submit@debbugs.gnu.org id=B59498.166938101417916 (code B ref 59498); Fri, 25 Nov 2022 12:57:02 +0000 Original-Received: (at 59498) by debbugs.gnu.org; 25 Nov 2022 12:56:54 +0000 Original-Received: from localhost ([127.0.0.1]:33818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyYGE-0004eu-4S for submit@debbugs.gnu.org; Fri, 25 Nov 2022 07:56:54 -0500 Original-Received: from out162-62-57-49.mail.qq.com ([162.62.57.49]:36155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyYG8-0004eY-41 for 59498@debbugs.gnu.org; Fri, 25 Nov 2022 07:56:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1669380998; bh=lVhmZCMCEH4Na6WlI8/Xn2+LeYCnNA7TMtMlF/4rK5E=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Y6RlnALR8pkuu3ErvZt6suq+bOBPpYbjYwzZU2T2598XMMn8ujCuuxB3YJdggYBiH Y03uVxb35+UkfcFeLfKm4bGKUfIWktEx+7N51VU1HdsAOPRFkW5Oxpk+PV9IvO+YTm vBZ5CO85Z/ZEcM3PayUbrNshl4FwoEMm4qylFoxI= Original-Received: from macbook ([114.82.35.56]) by newxmesmtplogicsvrsza10-0.qq.com (NewEsmtp) with SMTP id E24854D6; Fri, 25 Nov 2022 20:56:36 +0800 X-QQ-mid: xmsmtpt1669380996t1sfwws7v X-QQ-XMAILINFO: NyTsQ4JOu2J2l2pdiMRuO6WHQ+POXgJyhqvxlJbv2Mt779scY5s2uTH6SyJoaX 77y3AqWiFxEZhHm8UP98s6aYPsdYd4yMvYNn44FE1UdrG/MxsOuVVdluPZiBMH29RO/fa551juRo SwFYoLA5JK+81BWi2ayTTDGgQAL8MRKj/gsox213mUKBu9ESEZky7YGcwLImLXsBFKZ7v1KtUpjl ptxJopw4WuE5es2uicARLBz10ArWOFgiBgG+QklP9DoUry/UKwr71uS6mcI5XaLZ3PFbYST1SpW9 7JDVadxj9btE8UUJj8o2O5Q/o0Nork1Eegf8IobsvZbfxqPI3oHKxKL+pgJwQQJv6L2LHr1GWeBG /bTa4V0ZJRY/jh8pNwOihTfvG3VRdwKcuX1Rsa2eR59i5qrpv+kWfOL+pqYX2gJUkYTR7sEOte/v 2lyi83fkIQ6M8Nm+Y1uahTiiwb2QQMU/k4W9dG2qljdVlWqskiA9Vu4+AvKduGZgrAM7hv3WU7GA S2AyJ5Xycnn5LYauTzpdL01yfgXyd7wJr94r6qLairmXrFQ0Ypiu615cuKNPnfUMcudy85HPhqS2 6EMvwJAnU/KIOZ4cZOgPUEvH68QSNHYe8Ft5CtTpr2DzAXyhi/6418txEUs5ZrdVecTUMmVGgm62 7YSVPCiFN25IXD8gZjANmOvXzLnjr1PQkaqVqdXmjwmnv9ACgftk9IuiFBlscgRWAAqzt5KQUQbO dSZYN3ZbheDxL2nz5IITdq2I6yYr9V5kejYYG+tUF8iZc1um6D4UX/XNONKfUJ5VArm9XEudtLvB HGsmddiI8ATsENGoImeYxZz3SI2wSo8DmNZLDKLR In-Reply-To: <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev> (Randy Taylor's message of "Thu, 24 Nov 2022 14:39:19 +0000") Original-Message-ID: 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:248995 Randy Taylor writes: > On Wednesday, November 23rd, 2022 at 05:53, Eason Huang wrote: > >> >> >> But when I try to indent code, >> it will raise the error (Wrong type argument: stringp, nil) again. >> It should be a different bug. >> >> Steps to reproduce: >> >> After the step 4, try to type the code as below: >> >> int main(){ >> <-- put you cursor at the first colum 1, and then hit TAB(indent-for-tab-command) >> >> } >> >> after you hit TAB at the above code, you will get the backtrace error as >> below: >> >> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >> looking-at(nil t) >> #f(compiled-function (&rest _) #)(nil # 13) >> >> #f(compiled-function (fn) #)(#f(compiled-function (&rest _) #)) >> >> mapcar(#f(compiled-function (fn) #) >> (#f(compiled-function (n parent &rest _) #> 0x149caa867664fee9>) #f(compiled-function (&rest _) #> 0x18b0dfc57c56ebd8>))) >> >> #f(compiled-function (node parent bol &rest _) #)(nil # 13) >> >> treesit--simple-indent-eval(((and (parent-is "comment") comment-end) nil # 13)) >> >> treesit-simple-indent(nil # 13) >> >> treesit--indent-1() >> treesit-indent() >> indent-according-to-mode() >> electric-indent-post-self-insert-function() >> newline(nil 1) >> funcall-interactively(newline nil 1) >> command-execute(newline) >> >> >> -- >> Eason Huang >> > > The attached patch fixes it for me. > > Hi Randy, Thanks for your patch, I tested on macOS 13.0.1. And I can confirm that it fixes the issue of indentation. Hope it can be merged to master. -- Eason Huang