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: Wed, 23 Nov 2022 18:53:29 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5343"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59498@debbugs.gnu.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 23 11:54:17 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 1oxnOT-0001CX-9y for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Nov 2022 11:54:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxnOG-0002cY-63; Wed, 23 Nov 2022 05:54: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 1oxnOE-0002cP-NR for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 05:54: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 1oxnOE-0005pT-CF for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 05:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxnOE-0007OX-7f for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 05:54: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: Wed, 23 Nov 2022 10:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59498 X-GNU-PR-Package: emacs Original-Received: via spool by 59498-submit@debbugs.gnu.org id=B59498.166920082628403 (code B ref 59498); Wed, 23 Nov 2022 10:54:02 +0000 Original-Received: (at 59498) by debbugs.gnu.org; 23 Nov 2022 10:53:46 +0000 Original-Received: from localhost ([127.0.0.1]:53846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxnNx-0007O2-Ib for submit@debbugs.gnu.org; Wed, 23 Nov 2022 05:53:45 -0500 Original-Received: from out203-205-221-235.mail.qq.com ([203.205.221.235]:52818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxnNt-0007Nk-Op for 59498@debbugs.gnu.org; Wed, 23 Nov 2022 05:53:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1669200811; bh=PZtkvXT/kP4pWzv5vYv8isZiHqATF23Y1mI4SbygptE=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=LaJj/OR3Vtfs7DIf/o/DCFWVyuZuiaM6lOMutDONZfldTsMPKplgTxk7Aqf9wmVUQ RD9EbEQf24dhdBk+V6/03wrzv5dJOxd4TCAwTQANt+lRPtYhSbc7zpubSLMmRweR4z 2wqU+7zRH+W3aistkiVIeOCcsw//s7qE4q4P2LSw= Original-Received: from macbook ([114.82.35.56]) by newxmesmtplogicsvrszb9-0.qq.com (NewEsmtp) with SMTP id D5D988C7; Wed, 23 Nov 2022 18:53:29 +0800 X-QQ-mid: xmsmtpt1669200809tq28p2mzr X-QQ-XMAILINFO: NrI1OKqG5KOqmBVstOcmeCghycFFWPDUeFpdkmKTmK1RQyEh4tH9JU9i4xR9jq c+j6EwICWi/tjxqhaVrOVjgrJt+O2z9m/mjVCzKf/VWuUfPVdnlsIiXKlsauJZXO4t5gBrqNYWG8 aPg8qVMnspYlHjaiM3o0X+HtRhxtfy6JSKjqomK6R/kScwFlIe+rokNDjYneHk3AqwHPgxnrPldL 2q13L2KIGQ7T/TP0wzHct3gAIXj0YKGdWBQ5zcSUjqJF8ksG1Z7XiLUS9msm/cYlFuBEQBb3lWsl fKm/oLKc1pX0x1TcPA7iWjbrjIXtHY5vNgs/698w+B+ZWvEPHLro2WwQSaaMstfRkeK5joHY2uB3 5DK6yiNRK7E/5HcZ14R+p0FMsdnd8LIa+YJS6oK9lA/AfuEvuMEIlQ5FpljEckN4HydBwsc4QHw0 AuFlW7y8lyecVxoWMknnHmoDGtZEVb6zpzlVHUZFnt+ZSXfxdbHlGURy0U/spt7GDXAy+ON2nxmw Z44LlFzcrwr5kni7J5k8Lxs4jTd8qk3dO3FfkW2xkeLDkE+EYWcCXf0XexF8dTdfoCwCVUVXA0DZ rCeSAjJhx+xc7xCnEWWaTueEV6Qyyepim0jSzD5a+fu97CgMizn3SinU03UqnM20w+QCV8qPWSiC vDtr8BJrrgQ0hBrtDvYpqvuux7yM/4mgCqw0QzFYUhdpey7H6iDKm8lmL0JsYPPyjhb4VNIbcQGT wWGUUcJf+zQbhgcPPgYyhH3V4er5G0Z7841AozODOwwT4elwvTp4kmq1DqqqRJ6QImWTwwuyUM4+ vEXLjXQi1bPqcG1GXd3JQXz1G3bBmPWQLeD8SwQr In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?="'s message of "Wed, 23 Nov 2022 09:44:21 +0100") X-OQ-MSGID: 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:248726 Archived-At: Daniel Mart=C3=ADn writes: > Eason Huang writes: > >> Hi emacs-devel, >> >> I just tried the c++-ts-mode, but it didn't worked. >> >> steps to reproduce: >> >> 1. luanch Emacs with emacs -Q >> 2. C-x, C-f ~/test.cpp >> 3. M-x, toggle-debug-on-error >> 4. M-x, c++-ts-mode, now you will get the errors as bellow: >> >> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p ni= l) >> treesit-ready-p(cpp) >> c++-ts-mode() >> funcall-interactively(c++-ts-mode) >> command-execute(c++-ts-mode record) >> execute-extended-command(nil "c++-ts-mode" "c++-ts") >> funcall-interactively(execute-extended-command nil "c++-ts-mode" "c++-= ts") >> command-execute(execute-extended-command) >> >> By the way, python-ts-mode works well. >> >> I builded Emacs 29.0.50 with this commit: >> https://github.com/emacs-mirror/emacs/commit/057901f55ad12ebbc9cf092dd6a= d0f02539849f9 > > Could you try an Emacs build that contains commit c69858b3f0? This is > the same bug as bug#59497. Thanks. Hi Daniel, I build the latest commit(9f4306cd) and try it a again. This issue have been fixed. 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-co= mmand) } 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-fun= ction (&rest _) #)) mapcar(#f(compiled-function (fn) #) (#f(comp= iled-function (n parent &rest _) #) #f(compile= d-function (&rest _) #))) #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 # 1= 3) 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) --=20 Eason Huang