GNU bug report logs - #59498
29.0.50; c++-ts-mode get wrong-type-argument error when enabled

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Eason Huang <aqua0210@HIDDEN>; Keywords: patch; Done: Yuan Fu <casouri@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 30 Nov 2022 21:33:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 30 16:33:13 2022
Received: from localhost ([127.0.0.1]:35236 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p0Uhd-000238-84
	for submit <at> debbugs.gnu.org; Wed, 30 Nov 2022 16:33:13 -0500
Received: from mail-pj1-f48.google.com ([209.85.216.48]:38565)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1p0Uha-00022z-Hz
 for 59498 <at> debbugs.gnu.org; Wed, 30 Nov 2022 16:33:11 -0500
Received: by mail-pj1-f48.google.com with SMTP id
 l22-20020a17090a3f1600b00212fbbcfb78so3246429pjc.3
 for <59498 <at> debbugs.gnu.org>; Wed, 30 Nov 2022 13:33:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:from:to:cc:subject:date:message-id
 :reply-to; bh=CDnxnr/QvJQKbP24zAvYoF6UrsyvUbox/Kt8RFvFTlE=;
 b=mpk8JPlxcck7/KqIrfypMoDe+YHngFeqe/cKJMkQ1yKS/kJ1aMGMOFSkA/kdA6iwt1
 iChOhiE3k7hL75EDlSe1msheLj4XUGQjVcxpdG3SpDSv8cwUGjewmh1CidofvIcAr3pS
 eBjOvcBOdjfCwG2q+KRW5PmtPCE+5ofbm5W/Zjosx6sUTT3quaseL/OOXWX8Or2jGgfe
 SADC2zlQVoeuQFPxsSMk7xWE1LDcqnn+tq8+Vo8qMUz7pkfv5X39uzGwajz27WtnJucD
 0pStJdwmuBlMzLvGc8Xx6bxNc6OMokeNzViF4y/ahB7IgrExBzbSd6oojLv7i5pD5KiI
 Qxsw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=CDnxnr/QvJQKbP24zAvYoF6UrsyvUbox/Kt8RFvFTlE=;
 b=MNIqftOh40RxKuAbBd4vAL3Bc96KsSEjgYypZ2DspknvhqaKzUBQV6AGRl8FkeHoG6
 9r0LKS1Zy4u9pJ7XkDHOzfyG1W4tspa5ANMlpp13LcBS1jXZngWbmA9Z8REu0/SUnF8T
 ew1p38QfcFDg0GrYZCeVVdz8m8PofBtbxgwY5nnT3KdrP9hAIkTQgLuRZaokxwb2B7uD
 A7wJ8amgzlswWUyzdMuGrqrPNDYtBVNYyZH8w4ddhR2iUUUOA+wHbvqPuj2dqR48ivnO
 /tSyBNdbMDI9Yr/5vugmhu3Lb0vOl9o65napa2RzGcjnSyLIkwITymxVetd7xVfR9Dbu
 IvHA==
X-Gm-Message-State: ANoB5pmWGvY7lJV2+wAoKSQVUCZGlxTk6mx5ls85ErvH0+PBnRmsbiSZ
 5FuikZRCQQ91A2P0pBpR3X+LqOwgV5i7JA==
X-Google-Smtp-Source: AA0mqf4nEDVQze6ZxyUhjYSXvM4yuB21eeSjxaFTHS4wWv55g7CShHIY/0FnF4AKFETn8Jzb7pRncg==
X-Received: by 2002:a17:902:9343:b0:188:d824:dca with SMTP id
 g3-20020a170902934300b00188d8240dcamr44704553plp.114.1669843984681; 
 Wed, 30 Nov 2022 13:33:04 -0800 (PST)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 h9-20020a628309000000b00574de4a2fbasm1809625pfe.196.2022.11.30.13.33.03
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 30 Nov 2022 13:33:04 -0800 (PST)
From: Yuan Fu <casouri@HIDDEN>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error 
 when enabled
Message-Id: <72E27336-0B24-4C7A-A324-45F27A31AA36@HIDDEN>
Date: Wed, 30 Nov 2022 13:33:03 -0800
To: aqua0210@HIDDEN
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 59498
Cc: Randy Taylor <dev@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, 59498 <at> debbugs.gnu.org,
 mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Eason Huang <aqua0210@HIDDEN> writes:

> Yuan Fu <casouri@HIDDEN> writes:
>
>>> On Nov 26, 2022, at 11:24 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>>
>>>> From: Stefan Monnier <monnier@HIDDEN>
>>>> Cc: Yuan Fu <casouri@HIDDEN>,  dev@HIDDEN,  =
aqua0210@HIDDEN,
>>>>  59498 <at> debbugs.gnu.org,  mardani29@HIDDEN
>>>> Date: Sun, 27 Nov 2022 02:18:06 -0500
>>>>
>>>>>> I added treesit-comment-start/end to help indenting comments. So =
this is
>>>>>> the correct way to use them. The following comment explains why I =
created
>>>>>> new variables:
>>>>>>
>>>>>> ;; `comment-start' and `comment-end' assume there is only one =
type of
>>>>>> ;; comment, and that the comment spans only one line.  So they =
are not
>>>>>> ;; sufficient for our purpose.
>>>>>
>>>>> ??? This is surprisingly unclean, IMO.  For starters, the names of =
the
>>>>> variables are confusing.  The need to define two sets of =
comment-start and
>>>>> comment-end regexps is also a nuisance and a source of errors.
>>>>>
>>>>> How do non-treesit modes handle this issue?  Why do the =
treesit-based modes
>>>>> need something special here?
>>>>>
>>>>> Stefan, any ideas?
>>>>
>>>> `comment-start` and `comment-end` do not describe the set of =
possible
>>>> comment delimiters.  They describe the comment delimiters that =
should be
>>>> *inserted* when we do things like `comment-dwim`.
>>>>
>>>> To find/match comment delimiters we have `comment-start-skip` and
>>>> `comment-end-skip`.  They're not ideal, but they've been good =
enough so far.
>>>> They don't say which comment starter matches which comment-ender =
(that
>>>> was done by the syntax-tables), but tree-sitter should be able to =
tell
>>>> us that when we need it.
>>>>
>>>> It would be nice if we could avoid the need to set/use
>>>> `comment-start-skip` and `comment-end-skip` when using tree-sitter.
>>>> Maybe we can compute their values from the tree-sitter grammar.
>>>> But getting rid of uses of those vars will take a fair bit more =
work,
>>>> I think.
>>>
>>> OK, but do you agree that adding yet another pair of variables,
>>> treesit-comment-start/end, is the opposite of what we want?
>>
>> Yes. I removed them in d5dc1dbf7cb.
>>
>
>
> Hi Yuan,
>
> I build Emacs with the commit a85ff22300, which contain d5dc1dbf7cb,
> I can confirm that the indent issue has been fixed.
> Thanks you very much.

Thanks for verifying!

Yuan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.
bug marked as fixed in version 29.1, send any further explanations to 59498 <at> debbugs.gnu.org and Eason Huang <aqua0210@HIDDEN> Request was from Yuan Fu <casouri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 28 Nov 2022 13:59:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 28 08:59:53 2022
Received: from localhost ([127.0.0.1]:48772 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozefp-0004bX-Gj
	for submit <at> debbugs.gnu.org; Mon, 28 Nov 2022 08:59:53 -0500
Received: from out203-205-221-155.mail.qq.com ([203.205.221.155]:58795)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <aqua0210@HIDDEN>) id 1ozefk-0004bR-TX
 for 59498 <at> debbugs.gnu.org; Mon, 28 Nov 2022 08:59:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com;
 s=s201512; t=1669643981;
 bh=7TFDA7arS9XPkACFXDFjZA65IHr0EoAgzVPTOv3ySNk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=DrLf/gUY4Zy5Rm0M4kO0KtkbnEXh4v7bv44ylISWbQfc8BceTI5W2g4k68jYwiQHf
 wbm2hZCFpPz1/YRZo3RBIvolz5GaL0qnVDNKlxalGVGkr4qdD6Mpe4a/CoQe9SJIbX
 pS4oFaewRbrQd8VJGRtFiIJGVQLjlTqX+V8j3yeo=
Received: from macbook ([114.82.35.56])
 by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP
 id EE734692; Mon, 28 Nov 2022 21:59:39 +0800
X-QQ-mid: xmsmtpt1669643979twuu0bcda
Message-ID: <tencent_B7DDD790378DE4D65F1C4B3C913A368EC109@HIDDEN>
X-QQ-XMAILINFO: MJWNsjxQgzaEgBAnVIFzgNlK4/X3D8p2G3Dr4G+94hm2vyGErTt5SWloJOKKKl
 CwJDvBmTCPdHvd1qDEkD2B4eSiI8LQMmj2MbEDcTm3EfDpEhopRTi/BPVS9QXAIrYRL63iMfCwoZ
 aH8BnpfbuJPLcUcGwqJ9fQYw5xNjvYS7ix0a2o1JDHbVI3KqQ9B+f363TryK4s0dLGzloJnCkkyT
 I9YTCV4NURPnoc6m4n+Ul1pjOzNA4NAjcEJf8cZMjaZcXvIFzrRLlkAvoKvMGwALD21gFxWu4DOq
 Bx/DVH11zS0WQBl2ZcFMuL0OFwARWKYNOOPlfnWWqERcnns2YsCJ1ARn1drGvEyKv3T3w3up2Rbl
 wZ5k2PlJqQF2kzFv+2I8k2K3gMr1sbwBL8j1qeyxg8ykTJ6jNgH/F+1SqwMgy42YUzE1bMrwmUd6
 xk3Jg5Wtp1PiIV8xxo4yMk4IkDCLaIH25UKiIEyraHeKL7bFK3Kg2KK+wOPzMfHRb+qeBE6n1j6z
 avMXhD+EYIjHuMVzHj6FRHliEyNB8t3P7/lnQoWRGkQj67SuXq+iAjFFDgZWz5w+6MsIjYJwFO0n
 kACkqWPjzC6L8PQ8xFJdyv5qJeX/qcaywtU/1OcHJ+1CnpIOrF65CmpKAZZo53C6sDnEhAM7lTkt
 4Sszd18nBNf0XZqwwYsa8DkCvnWWx+gnNXgvxbmEYewHoDpIiwIXp31PqJaGkRn8VuUN5icr5vND
 Mr7wWl3U+PDFpJPWFVdCzok8ve2xgR62cgzNGaoOlXKF8NqYbJBEGSS+/3VOF+hnMcFi0yRQCbTM
 TZNvTFo6RTEmEOiyjSjG5Agek0X5SSMSm9ssDKCi+nUlRX/nE68XzYfDYE1Mcn+QlZhCUpS18tQk
 kELDa1HCIScHwOM1ouUUICzarPKlmQFMO7KjljduTcZe4jiDS+rvWrvIZrXoBIu9JyBKKXFhUJVM
 bB/s1lbQg3v8kPXelfetsWHa7egaT/TGvFXZqn/DILaHdgErsZjStH9dda0ZqPEKuRFJeZrnk=
From: Eason Huang <aqua0210@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
In-Reply-To: <49C8837A-A6D3-4ABF-BC3B-97ECE925F85C@HIDDEN> (Yuan Fu's
 message of "Sun, 27 Nov 2022 14:21:46 -0800")
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 <838rjyt15i.fsf@HIDDEN>
 <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN>
 <83ilj0rk2y.fsf@HIDDEN> <jwvsfi4hnzi.fsf-monnier+emacs@HIDDEN>
 <837czgrh9y.fsf@HIDDEN>
 <49C8837A-A6D3-4ABF-BC3B-97ECE925F85C@HIDDEN>
Date: Mon, 28 Nov 2022 21:59:39 +0800
Message-ID: <m2r0xnw56c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 4.9 (++++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Yuan Fu writes: >> On Nov 26, 2022, at 11:24 PM,
 Eli Zaretskii
 wrote: >> >>> From: Stefan Monnier >>> Cc: Yuan Fu , dev@HIDDEN,
 aqua0210@HIDDEN, 
 >>> 59498 <at> debbugs.gnu.org, mardani29@HIDDEN >>> Date: Sun, [...] 
 Content analysis details:   (4.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [203.205.221.155 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [203.205.221.155 listed in wl.mailspike.net]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (aqua0210[at]foxmail.com)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (aqua0210[at]foxmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP
 addr 1)
 1.0 FREEMAIL_REPLY         From and body contain different freemails
X-Debbugs-Envelope-To: 59498
Cc: dev@HIDDEN, Eli Zaretskii <eliz@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, 59498 <at> debbugs.gnu.org,
 mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Yuan Fu writes: >> On Nov 26, 2022, at 11:24 PM, Eli Zaretskii
    wrote: >> >>> From: Stefan Monnier >>> Cc: Yuan Fu , dev@HIDDEN, aqua0210@HIDDEN,
    >>> 59498 <at> debbugs.gnu.org, mardani29@HIDDEN >>> Date: Sun, [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [203.205.221.155 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [203.205.221.155 listed in wl.mailspike.net]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
                             in digit (aqua0210[at]foxmail.com)
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (aqua0210[at]foxmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP
                             addr 1)

Yuan Fu <casouri@HIDDEN> writes:

>> On Nov 26, 2022, at 11:24 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>
>>> From: Stefan Monnier <monnier@HIDDEN>
>>> Cc: Yuan Fu <casouri@HIDDEN>,  dev@HIDDEN,  aqua0210@HIDDEN,
>>>  59498 <at> debbugs.gnu.org,  mardani29@HIDDEN
>>> Date: Sun, 27 Nov 2022 02:18:06 -0500
>>>
>>>>> I added treesit-comment-start/end to help indenting comments. So this is
>>>>> the correct way to use them. The following comment explains why I created
>>>>> new variables:
>>>>>
>>>>> ;; `comment-start' and `comment-end' assume there is only one type of
>>>>> ;; comment, and that the comment spans only one line.  So they are not
>>>>> ;; sufficient for our purpose.
>>>>
>>>> ??? This is surprisingly unclean, IMO.  For starters, the names of the
>>>> variables are confusing.  The need to define two sets of comment-start and
>>>> comment-end regexps is also a nuisance and a source of errors.
>>>>
>>>> How do non-treesit modes handle this issue?  Why do the treesit-based modes
>>>> need something special here?
>>>>
>>>> Stefan, any ideas?
>>>
>>> `comment-start` and `comment-end` do not describe the set of possible
>>> comment delimiters.  They describe the comment delimiters that should be
>>> *inserted* when we do things like `comment-dwim`.
>>>
>>> To find/match comment delimiters we have `comment-start-skip` and
>>> `comment-end-skip`.  They're not ideal, but they've been good enough so far.
>>> They don't say which comment starter matches which comment-ender (that
>>> was done by the syntax-tables), but tree-sitter should be able to tell
>>> us that when we need it.
>>>
>>> It would be nice if we could avoid the need to set/use
>>> `comment-start-skip` and `comment-end-skip` when using tree-sitter.
>>> Maybe we can compute their values from the tree-sitter grammar.
>>> But getting rid of uses of those vars will take a fair bit more work,
>>> I think.
>>
>> OK, but do you agree that adding yet another pair of variables,
>> treesit-comment-start/end, is the opposite of what we want?
>
> Yes. I removed them in d5dc1dbf7cb.
>


Hi Yuan,

I build Emacs with the commit a85ff22300, which contain d5dc1dbf7cb,
I can confirm that the indent issue has been fixed.
Thanks you very much.

-- 
Eason Huang




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 28 Nov 2022 00:24:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 27 19:24:15 2022
Received: from localhost ([127.0.0.1]:45039 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozRwV-0004np-7X
	for submit <at> debbugs.gnu.org; Sun, 27 Nov 2022 19:24:15 -0500
Received: from mail-ot1-f42.google.com ([209.85.210.42]:36701)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1ozRwT-0004nh-OM
 for 59498 <at> debbugs.gnu.org; Sun, 27 Nov 2022 19:24:14 -0500
Received: by mail-ot1-f42.google.com with SMTP id
 l42-20020a9d1b2d000000b0066c6366fbc3so6003500otl.3
 for <59498 <at> debbugs.gnu.org>; Sun, 27 Nov 2022 16:24:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=nGoIzYZO4uSHyItl1qvTyMya6IiaWBLJxYNjABka0no=;
 b=hUrFOYjxumrI1od6zOcHWZyuHBesO92u9n+W93cA56/TWYS03t9S7H2/R/0cs31UIH
 FcKLE30ert4kwdzkLv92i4aVi2trSMUOKulJ21Xsa/L53N/fiZRvxD+KWrBXqeN1mcqU
 ZvrTcyrfLzaTuvGr+HPkNhqMcMRF+6F7GPIEC87kQOtyBk9V0bW5ut4hA/5H585VW8qG
 Cg7PzjFvSnm7aH8rSwGFFU1RA08NefCe9bhHduk0De6rXz6H+rSXeP2yK67N+cwgCyDx
 /rrEhUbvwW8I/jFDPvdkijCEwJOwJj79d1EiJ10Rh1LZNk/VjviZamTntFucmc4jG/MH
 BEsw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=nGoIzYZO4uSHyItl1qvTyMya6IiaWBLJxYNjABka0no=;
 b=tifxzoZrEC1L7qavhVAS9OrSp+O3gjNbqiUgJryxc5ccqlMzWufWT8sFL281KR1a1A
 5zaGbZQOLMaMUNbGt7MyJVOsVhIOS1ssJrsRXcfJhh7Pyp9eAj2GLWJ+KfDiiwdZbwU/
 kYsiC8bVoS65QGxiOswRvMcWnu1N4QT+EypoxqT6w9bsyxBvHqRJoYfwAc51B4+YLpav
 p8xo1DC9IaojF6U3RiB2dtLpEOm4orF2AVUNfER7W0VT7EscyyLgKr18M4oSFbuNJGT1
 EU7IHpRZEp/iFEJdyH5Prkqdcz+mD4Z+vc4VkJWE4qOxCyFWPdYH20F3XGqG0SrAwC4F
 +0Sw==
X-Gm-Message-State: ANoB5pm9qDMZEfzXHYhmSwcSdo2QeTDNVfR+tpQJZw604vM4JptKbwZJ
 TMmqJ4bh9ll0e4u9sWFCGn/i5kNGNv0PpDTBTd0=
X-Google-Smtp-Source: AA0mqf4w6S+O9RlaewfRGkpRq1RG0Y0m2bftSIP7EANKKER7jiAPTO45qT8nbVKcUSo+dB+VvPvUeoKwdIUcry0wR6w=
X-Received: by 2002:a9d:70cc:0:b0:66c:5232:b9d1 with SMTP id
 w12-20020a9d70cc000000b0066c5232b9d1mr13951318otj.224.1669595048025; Sun, 27
 Nov 2022 16:24:08 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 27 Nov 2022 16:24:07 -0800
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <49C8837A-A6D3-4ABF-BC3B-97ECE925F85C@HIDDEN>
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 <838rjyt15i.fsf@HIDDEN> <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN>
 <83ilj0rk2y.fsf@HIDDEN> <jwvsfi4hnzi.fsf-monnier+emacs@HIDDEN>
 <837czgrh9y.fsf@HIDDEN> <49C8837A-A6D3-4ABF-BC3B-97ECE925F85C@HIDDEN>
X-Hashcash: 1:20:221128:eliz@HIDDEN::Ek25aU0I1+6p+q8L:23fL
MIME-Version: 1.0
Date: Sun, 27 Nov 2022 16:24:07 -0800
Message-ID: <CADwFkmn=iukH_4tW-UOR91b0HmP-tzK6bcORZ6Rk3hjOtB9eog@HIDDEN>
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
To: Yuan Fu <casouri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 59498
Cc: dev@HIDDEN, aqua0210@HIDDEN,
 Stefan Monnier <monnier@HIDDEN>, 59498 <at> debbugs.gnu.org,
 mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Yuan Fu <casouri@HIDDEN> writes:

>> OK, but do you agree that adding yet another pair of variables,
>> treesit-comment-start/end, is the opposite of what we want?
>
> Yes. I removed them in d5dc1dbf7cb.

I also think some documentation updates might be needed:

admin/notes/tree-sitter/html-manual/Parser_002dbased-Indentation.html
191: defined by regular expression <code>treesit-comment-end</code>
192: (see <a href="Tree_002dsitter-major-modes.html">treesit-comment-end</a>).
239: expression <code>treesit-comment-start</code> (see <a
href="Tree_002dsitter-major-modes.html">treesit-comment-start</a>).
This function assumes <var>parent</var> is
248: <code>treesit-comment-start</code>.  This function assumes
<var>parent</var> is

doc/lispref/modes.texi
4974: defined by regular expression @code{treesit-comment-end}
4975: (@pxref{Tree-sitter major modes, treesit-comment-end}).
5014: expression @code{treesit-comment-start} (@pxref{Tree-sitter major
5015: modes, treesit-comment-start}).  This function assumes @var{parent} is
5023: @code{treesit-comment-start}.  This function assumes @var{parent} is

doc/lispref/parsing.texi
1733: @defvar treesit-comment-start
1739: @defvar treesit-comment-end

lisp/treesit.el
1180:     Matches if text after point matches `treesit-comment-end'.
1215:     Returns the position after a match for `treesit-comment-start'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 27 Nov 2022 22:21:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 27 17:21:56 2022
Received: from localhost ([127.0.0.1]:44530 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozQ27-0001V7-Ls
	for submit <at> debbugs.gnu.org; Sun, 27 Nov 2022 17:21:56 -0500
Received: from mail-pf1-f176.google.com ([209.85.210.176]:36651)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1ozQ25-0001V1-Me
 for 59498 <at> debbugs.gnu.org; Sun, 27 Nov 2022 17:21:54 -0500
Received: by mail-pf1-f176.google.com with SMTP id x66so8792638pfx.3
 for <59498 <at> debbugs.gnu.org>; Sun, 27 Nov 2022 14:21:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=S2A8+qKgH/4X0CZNmT6ZfYREIBE22qsecPUDW0kALhk=;
 b=jROT1AKez/y8EuyvCIv5ThjrN0eIpXcF7+4oBzoaTEe5AztD+lu5hl9StM6wISHwG7
 mnEK9woXwRpfo9RIdi587INPjWP81gk1QDb2w389vfNSWk8MQLSCp2iaOLfElBX9d7X/
 v/ui43HQALUN97ALv/IclRKKtXheTO0aA0sbmDmM0d62aa+sylrhCgs7f2TKn9mq2Kow
 v9JVv+XiCkfMW0BxWAMpcRoOuHstFeuAkxQyJFgzbH+USTRAldj+TDUXra7tkiTPXISV
 lCR69AHdD6jXAO8edj3LkwAgNhv/R20yZGLiSQvzaab/wX6tkdgjbx6aHSKGCWiQORA7
 ESag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=S2A8+qKgH/4X0CZNmT6ZfYREIBE22qsecPUDW0kALhk=;
 b=O6xK5/jNuqKLryAEeCJit3ZKEpt6b2L6tM7wH1g0/vZe9175ZZe/SAW55nJ94HxraD
 B8fOb6DNIXv3rDKuflahNk+IrVX14yXsmo1kxCRCE+EagBQit/Q195J3Lb2viT/D1LZP
 uSmvX8vHdFpnHB2NmCE0zQqipzkZcfdrb+bF0vBkkJuzs2hv9fi+A4wuDZG1kOb4TpHP
 m2+rxKad8UlGHws+tG9RgB8D+YVJPK/1I2/zpHdhip6YpRWZnJR4U2NkzRYE/SbP2OBm
 AB2z42Cvqr4WuYYw2MTtWRecYV7fSh3aUvzR2Z+FV5gJF9MII1qIQuLnZ63jUVw5HMZ1
 pHxw==
X-Gm-Message-State: ANoB5pl64MKgLFL1079MayiimEgkAoY5osdADkZf+Fj7GpPzt0YQwlyF
 9MlG9Cc0SY/MRpCTXH3Snx0=
X-Google-Smtp-Source: AA0mqf6oumB88oZxtdWI/+ZesDrWWycoPcKCQmi7y+0M1sA523z71VP0L1JvcTDJGgOa1ltlj0k1Ug==
X-Received: by 2002:a63:711e:0:b0:477:5654:c37e with SMTP id
 m30-20020a63711e000000b004775654c37emr33169807pgc.206.1669587707797; 
 Sun, 27 Nov 2022 14:21:47 -0800 (PST)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 17-20020a170902c11100b001766a3b2a26sm7295557pli.105.2022.11.27.14.21.46
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 27 Nov 2022 14:21:47 -0800 (PST)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <837czgrh9y.fsf@HIDDEN>
Date: Sun, 27 Nov 2022 14:21:46 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <49C8837A-A6D3-4ABF-BC3B-97ECE925F85C@HIDDEN>
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 <838rjyt15i.fsf@HIDDEN> <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN>
 <83ilj0rk2y.fsf@HIDDEN> <jwvsfi4hnzi.fsf-monnier+emacs@HIDDEN>
 <837czgrh9y.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 59498
Cc: dev@HIDDEN, aqua0210@HIDDEN,
 Stefan Monnier <monnier@HIDDEN>, 59498 <at> debbugs.gnu.org,
 mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Nov 26, 2022, at 11:24 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> From: Stefan Monnier <monnier@HIDDEN>
>> Cc: Yuan Fu <casouri@HIDDEN>,  dev@HIDDEN,  aqua0210@HIDDEN,
>>  59498 <at> debbugs.gnu.org,  mardani29@HIDDEN
>> Date: Sun, 27 Nov 2022 02:18:06 -0500
>>=20
>>>> I added treesit-comment-start/end to help indenting comments. So =
this is
>>>> the correct way to use them. The following comment explains why I =
created
>>>> new variables:
>>>>=20
>>>> ;; `comment-start' and `comment-end' assume there is only one type =
of
>>>> ;; comment, and that the comment spans only one line.  So they are =
not
>>>> ;; sufficient for our purpose.
>>>=20
>>> ??? This is surprisingly unclean, IMO.  For starters, the names of =
the
>>> variables are confusing.  The need to define two sets of =
comment-start and
>>> comment-end regexps is also a nuisance and a source of errors.
>>>=20
>>> How do non-treesit modes handle this issue?  Why do the =
treesit-based modes
>>> need something special here?
>>>=20
>>> Stefan, any ideas?
>>=20
>> `comment-start` and `comment-end` do not describe the set of possible
>> comment delimiters.  They describe the comment delimiters that should =
be
>> *inserted* when we do things like `comment-dwim`.
>>=20
>> To find/match comment delimiters we have `comment-start-skip` and
>> `comment-end-skip`.  They're not ideal, but they've been good enough =
so far.
>> They don't say which comment starter matches which comment-ender =
(that
>> was done by the syntax-tables), but tree-sitter should be able to =
tell
>> us that when we need it.
>>=20
>> It would be nice if we could avoid the need to set/use
>> `comment-start-skip` and `comment-end-skip` when using tree-sitter.
>> Maybe we can compute their values from the tree-sitter grammar.
>> But getting rid of uses of those vars will take a fair bit more work,
>> I think.
>=20
> OK, but do you agree that adding yet another pair of variables,
> treesit-comment-start/end, is the opposite of what we want?

Yes. I removed them in d5dc1dbf7cb.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 27 Nov 2022 22:00:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 27 17:00:52 2022
Received: from localhost ([127.0.0.1]:44449 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozPhk-0001ML-KA
	for submit <at> debbugs.gnu.org; Sun, 27 Nov 2022 17:00:52 -0500
Received: from mail-pg1-f172.google.com ([209.85.215.172]:37394)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1ozPhi-0001MF-PS
 for 59498 <at> debbugs.gnu.org; Sun, 27 Nov 2022 17:00:51 -0500
Received: by mail-pg1-f172.google.com with SMTP id v3so8343948pgh.4
 for <59498 <at> debbugs.gnu.org>; Sun, 27 Nov 2022 14:00:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=/SpINPLfVtMZvn7avDt6qmoK1Pm/rDzz5vkVt2c28Ew=;
 b=gNpk4Q61Y0mcDipOUhEkRBPme9pvb1cMVLDFihcY7gcnvWn51YnGUt841621k+e44l
 r9Z+2D7qnJtL28zCm34engIiVOHODL9cz62EXUZs+W4D10CDSuTBMmfbpkmhi/Rdkqjl
 J5bCKt6T65307mQJ8ZteEqjNz25xZqMzoeoh0t1a3io2HrEU0teMNDOIeHaQiIzxq0s5
 FqyIjr0R8NXy+rLGKqv3Mrp/8BRZ6UpQWhnMyiZCnsRL9XMZazsn+5erHnhBHvUfbmoP
 gSruNGhch3hiEucPiFUlzufPdW8CO/3GASe/eoEbeYawO9LqGMmBSFlcaNRLbDmAWt0l
 lPDw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=/SpINPLfVtMZvn7avDt6qmoK1Pm/rDzz5vkVt2c28Ew=;
 b=KnTH3iitCbN5LErEJTCoPrVPz40taK9P14s5fNkw6hXFPGn3PadkR5iojBG+zdloyd
 vEb27swRIHvlFnodPJgPYHlb6C12LZhu8/JM1YG3XvYyGoexbN5v9pzoB62s4sktJ71A
 GR6cqqAP9arG6X1iLLamRUd7+f7ce9PWtP1O6nKhoGmRepjzRbLKRrzKv2w5flUo33Jr
 RvXMHBPeRkQ4g2AHFSe3lTIODyIwWK6Fbha2kAFEnW21XVOxX5dSN1gItQI9/pOxb0/q
 OEw+tdHKkESkfsZbcezgiMkYhuph9hoW5vC03a9+zclmDuvtS6W7fiWkAYqemRuGHhUL
 4I6g==
X-Gm-Message-State: ANoB5pnrCSdADeJVk04T8ACcQrLPl7/tcbO/nT8EphDNRmlgOgiB0vbr
 WtwmQWG43FEeruWqbymAU2E=
X-Google-Smtp-Source: AA0mqf4G0wcEefejM0/t52zrB+KSdJlBByAxpH8GQiOXQvhdZiBgwoaCEbkwQiwFMvDUzgTE36MHmw==
X-Received: by 2002:a63:5d45:0:b0:476:dd29:75a8 with SMTP id
 o5-20020a635d45000000b00476dd2975a8mr25165011pgm.547.1669586444944; 
 Sun, 27 Nov 2022 14:00:44 -0800 (PST)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 h21-20020aa796d5000000b0056bad6ff1b8sm6596863pfq.101.2022.11.27.14.00.44
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 27 Nov 2022 14:00:44 -0800 (PST)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <jwvsfi4hnzi.fsf-monnier+emacs@HIDDEN>
Date: Sun, 27 Nov 2022 14:00:41 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <9639B940-24CA-4105-85AF-3BBC1EAEFDC6@HIDDEN>
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 <838rjyt15i.fsf@HIDDEN> <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN>
 <83ilj0rk2y.fsf@HIDDEN> <jwvsfi4hnzi.fsf-monnier+emacs@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59498
Cc: Randy Taylor <dev@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 aqua0210@HIDDEN, 59498 <at> debbugs.gnu.org, mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Nov 26, 2022, at 11:18 PM, Stefan Monnier =
<monnier@HIDDEN> wrote:
>=20
>>> I added treesit-comment-start/end to help indenting comments. So =
this is
>>> the correct way to use them. The following comment explains why I =
created
>>> new variables:
>>>=20
>>> ;; `comment-start' and `comment-end' assume there is only one type =
of
>>> ;; comment, and that the comment spans only one line.  So they are =
not
>>> ;; sufficient for our purpose.
>>=20
>> ??? This is surprisingly unclean, IMO.  For starters, the names of =
the
>> variables are confusing.  The need to define two sets of =
comment-start and
>> comment-end regexps is also a nuisance and a source of errors.
>>=20
>> How do non-treesit modes handle this issue?  Why do the treesit-based =
modes
>> need something special here?
>>=20
>> Stefan, any ideas?
>=20
> `comment-start` and `comment-end` do not describe the set of possible
> comment delimiters.  They describe the comment delimiters that should =
be
> *inserted* when we do things like `comment-dwim`.
>=20
> To find/match comment delimiters we have `comment-start-skip` and
> `comment-end-skip`.  They're not ideal, but they've been good enough =
so far.
> They don't say which comment starter matches which comment-ender (that
> was done by the syntax-tables), but tree-sitter should be able to tell
> us that when we need it.

Ah, I should=E2=80=99ve done more research, sorry. =
comment-start/end-skip can completely replace treesit-comment-start/end.

> It would be nice if we could avoid the need to set/use
> `comment-start-skip` and `comment-end-skip` when using tree-sitter.
> Maybe we can compute their values from the tree-sitter grammar.
> But getting rid of uses of those vars will take a fair bit more work,
> I think.

Tree-sitter puts the whole comment in a single =E2=80=9Ccomment=E2=80=9D =
node, so there is no hope getting comment-start/end from it, sadly.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 27 Nov 2022 07:24:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 27 02:24:41 2022
Received: from localhost ([127.0.0.1]:42007 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozC1p-0007Rc-8y
	for submit <at> debbugs.gnu.org; Sun, 27 Nov 2022 02:24:41 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37894)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ozC1o-0007RW-0N
 for 59498 <at> debbugs.gnu.org; Sun, 27 Nov 2022 02:24:40 -0500
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 <eliz@HIDDEN>)
 id 1ozC1g-0001g6-Hu; Sun, 27 Nov 2022 02:24:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=S2LAdz0BJoChxACWW7zJ4criJLxS4g00Q1tpD0JQZiA=; b=P0j5JPzgft5j
 gsd3tjMPl7w2V+U3vlyVXXfFfqkUiglLyM/0M/swRJ8zyLcEOrPnOMZa/ABG2dWlA9q0NU0Nvnyup
 Iw8O8FMcN7RpuYv0fzdMMqNTYlW1Aaby7kK+rAlAy7BnwIbtuUnnDwobMkrv0PMY94sXW5DuxYEkf
 zS/0W9O5L0gsnfK7+wJPO6ChvQVpxVQF8ykNgLZ4j4YZKkHDnxBD1GnSs82Jlt56pQoxRbDUthKVT
 LO/yLII+iZkJ5l4J4j8nP4svTGeI7IKBPFVY979u/L28eHZwa3tFCb8i+uCV4nX1/o6+e8UrbwXRC
 d38okYIiW7zQHiTBVJZhRQ==;
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 <eliz@HIDDEN>)
 id 1ozC1e-0007Hb-OJ; Sun, 27 Nov 2022 02:24:31 -0500
Date: Sun, 27 Nov 2022 09:24:57 +0200
Message-Id: <837czgrh9y.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvsfi4hnzi.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Sun, 27 Nov 2022 02:18:06 -0500)
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 <838rjyt15i.fsf@HIDDEN>
 <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN>
 <83ilj0rk2y.fsf@HIDDEN> <jwvsfi4hnzi.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59498
Cc: dev@HIDDEN, casouri@HIDDEN, aqua0210@HIDDEN, 59498 <at> debbugs.gnu.org,
 mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Yuan Fu <casouri@HIDDEN>,  dev@HIDDEN,  aqua0210@HIDDEN,
>   59498 <at> debbugs.gnu.org,  mardani29@HIDDEN
> Date: Sun, 27 Nov 2022 02:18:06 -0500
> 
> >> I added treesit-comment-start/end to help indenting comments. So this is
> >> the correct way to use them. The following comment explains why I created
> >> new variables:
> >> 
> >> ;; `comment-start' and `comment-end' assume there is only one type of
> >> ;; comment, and that the comment spans only one line.  So they are not
> >> ;; sufficient for our purpose.
> >
> > ??? This is surprisingly unclean, IMO.  For starters, the names of the
> > variables are confusing.  The need to define two sets of comment-start and
> > comment-end regexps is also a nuisance and a source of errors.
> >
> > How do non-treesit modes handle this issue?  Why do the treesit-based modes
> > need something special here?
> >
> > Stefan, any ideas?
> 
> `comment-start` and `comment-end` do not describe the set of possible
> comment delimiters.  They describe the comment delimiters that should be
> *inserted* when we do things like `comment-dwim`.
> 
> To find/match comment delimiters we have `comment-start-skip` and
> `comment-end-skip`.  They're not ideal, but they've been good enough so far.
> They don't say which comment starter matches which comment-ender (that
> was done by the syntax-tables), but tree-sitter should be able to tell
> us that when we need it.
> 
> It would be nice if we could avoid the need to set/use
> `comment-start-skip` and `comment-end-skip` when using tree-sitter.
> Maybe we can compute their values from the tree-sitter grammar.
> But getting rid of uses of those vars will take a fair bit more work,
> I think.

OK, but do you agree that adding yet another pair of variables,
treesit-comment-start/end, is the opposite of what we want?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 27 Nov 2022 07:18:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 27 02:18:17 2022
Received: from localhost ([127.0.0.1]:41993 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozBvc-0007NW-Rf
	for submit <at> debbugs.gnu.org; Sun, 27 Nov 2022 02:18:17 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63233)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1ozBva-0007NP-Dk
 for 59498 <at> debbugs.gnu.org; Sun, 27 Nov 2022 02:18:15 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C3A741000FB;
 Sun, 27 Nov 2022 02:18:08 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 307B51000D2;
 Sun, 27 Nov 2022 02:18:07 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1669533487;
 bh=sw1ABnVXsD2mUi5UZNLzRnhIDh5CQHEJwejqPYRqIxQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=YTO/SdAtQFcycMplkZ4BfaAOLzkPjHTkQk9Ez60C9Ue/LwSQonySl1Qt1dfEi8qUb
 qoOsVe84INw6WesW24bJlz6bos4Y42brKsmoMBx/YllTQEIn9roa3ZWW6FggD01dmz
 tTYSLy/AztfkxG9zVMk4T2H9Ep4Vvqe9AU4VdONq53wcOhHZZLmd1aOZppBqo8/CkH
 nUZcqnGKbXstA0muD2DdT+qq38yhEpv5ZH78w3KrPwfdLKXnX0qMhJ9ZxkOhH580ks
 kPOFAESkK9paednU6cxD3AKmeE7bALYCpacYJVEhLrzkKbAVeiIjJ+VXEIfg0Ciuze
 1eQRKvmV6oN0A==
Received: from pastel (unknown [104.247.241.157])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BAA05120F97;
 Sun, 27 Nov 2022 02:18:06 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
In-Reply-To: <83ilj0rk2y.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 27 Nov
 2022 08:24:21 +0200")
Message-ID: <jwvsfi4hnzi.fsf-monnier+emacs@HIDDEN>
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 <838rjyt15i.fsf@HIDDEN>
 <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN>
 <83ilj0rk2y.fsf@HIDDEN>
Date: Sun, 27 Nov 2022 02:18:06 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results: =?UTF-8?Q?0=0A=09?=ALL_TRUSTED -1 Passed
 through trusted hosts only via =?UTF-8?Q?SMTP=0A=09?=AWL -0.140 Adjusted
 score from AWL reputation of From: =?UTF-8?Q?address=0A=09?=BAYES_00 -1.9
 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily =?UTF-8?Q?valid=0A=09?=DKIM_VALID -0.1 Message has at least
 one valid DKIM or DK =?UTF-8?Q?signature=0A=09?=DKIM_VALID_AU -0.1 Message
 has a valid DKIM or DK signature from author's domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59498
Cc: dev@HIDDEN, Yuan Fu <casouri@HIDDEN>, aqua0210@HIDDEN,
 59498 <at> debbugs.gnu.org, mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> I added treesit-comment-start/end to help indenting comments. So this is
>> the correct way to use them. The following comment explains why I created
>> new variables:
>> 
>> ;; `comment-start' and `comment-end' assume there is only one type of
>> ;; comment, and that the comment spans only one line.  So they are not
>> ;; sufficient for our purpose.
>
> ??? This is surprisingly unclean, IMO.  For starters, the names of the
> variables are confusing.  The need to define two sets of comment-start and
> comment-end regexps is also a nuisance and a source of errors.
>
> How do non-treesit modes handle this issue?  Why do the treesit-based modes
> need something special here?
>
> Stefan, any ideas?

`comment-start` and `comment-end` do not describe the set of possible
comment delimiters.  They describe the comment delimiters that should be
*inserted* when we do things like `comment-dwim`.

To find/match comment delimiters we have `comment-start-skip` and
`comment-end-skip`.  They're not ideal, but they've been good enough so far.
They don't say which comment starter matches which comment-ender (that
was done by the syntax-tables), but tree-sitter should be able to tell
us that when we need it.

It would be nice if we could avoid the need to set/use
`comment-start-skip` and `comment-end-skip` when using tree-sitter.
Maybe we can compute their values from the tree-sitter grammar.
But getting rid of uses of those vars will take a fair bit more work,
I think.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 27 Nov 2022 06:24:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 27 01:24:05 2022
Received: from localhost ([127.0.0.1]:41921 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ozB5A-0004Jk-TV
	for submit <at> debbugs.gnu.org; Sun, 27 Nov 2022 01:24:05 -0500
Received: from eggs.gnu.org ([209.51.188.92]:42788)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ozB59-0004JE-ED
 for 59498 <at> debbugs.gnu.org; Sun, 27 Nov 2022 01:24:04 -0500
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 <eliz@HIDDEN>)
 id 1ozB51-0007aF-9M; Sun, 27 Nov 2022 01:23:55 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=MsTY88kfTNGoPmddeX1D6agEmJ6xCKtB1o69Tv8pS30=; b=iiSj5GJCFLLL
 4i1osgk10zG/NK4pM2W5/9Sbf7gK5YW3jWp3sJUCjXo5AZDxUvdt0YeCI5Mhzzw4nOEn0R1jkgKyC
 Bs8ACLM3RgvT+ZNCO4WDbvaOvb+IaN4glNwvcEbSLdbIYkbf+UnjoiFVzVmA0ez5v5ziP/AsCCCUj
 vD08VULwBnLH6QtikQVK9Tu79I5lX7PLqA/SU57TcZqqu5s0TogTaMIDlA7N7a8OOX8mdBoEjYpoK
 mCqRzwUQqgbf23qUW+nALLHulAzEbhyIPNPXgleL/v9lxSt0VG5/CS7LNhAKZOt8gMJlqFDehhh+T
 fCcVitNHM8zA6nMj2zmLPg==;
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 <eliz@HIDDEN>)
 id 1ozB50-00072O-MZ; Sun, 27 Nov 2022 01:23:55 -0500
Date: Sun, 27 Nov 2022 08:24:21 +0200
Message-Id: <83ilj0rk2y.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN> (message from
 Yuan Fu on Sat, 26 Nov 2022 14:11:48 -0800)
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 <838rjyt15i.fsf@HIDDEN> <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59498
Cc: dev@HIDDEN, aqua0210@HIDDEN, 59498 <at> debbugs.gnu.org,
 mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Sat, 26 Nov 2022 14:11:48 -0800
> Cc: Randy Taylor <dev@HIDDEN>,
>  aqua0210@HIDDEN,
>  59498 <at> debbugs.gnu.org,
>  mardani29@HIDDEN
> 
> >> +  (setq-local treesit-comment-start (rx "/" (or (+ "/") (+ "*"))))
> >> +  (setq-local treesit-comment-end (rx (+ (or "*")) "/"))
> >> 
> >>   (treesit-parser-create 'cpp)
> > 
> > Thanks, but this doesn't look right to me: why should c++-ts-mode set
> > variables for treesit.el?  It is more likely that treesit.el should use the
> > buffer-local values of comment-start and comment-end instead, and fall back
> > on generic values (if they make sense) only if the local values are not set.
> > 
> > Yuan, WDYT?
> 
> I added treesit-comment-start/end to help indenting comments. So this is the correct way to use them. The following comment explains why I created new variables:
> 
> ;; `comment-start' and `comment-end' assume there is only one type of
> ;; comment, and that the comment spans only one line.  So they are not
> ;; sufficient for our purpose.

??? This is surprisingly unclean, IMO.  For starters, the names of the
variables are confusing.  The need to define two sets of comment-start and
comment-end regexps is also a nuisance and a source of errors.

How do non-treesit modes handle this issue?  Why do the treesit-based modes
need something special here?

Stefan, any ideas?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 26 Nov 2022 22:12:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 26 17:12:01 2022
Received: from localhost ([127.0.0.1]:41616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oz3Oz-0007pM-Ak
	for submit <at> debbugs.gnu.org; Sat, 26 Nov 2022 17:12:01 -0500
Received: from mail-pg1-f172.google.com ([209.85.215.172]:42664)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1oz3Ou-0007pG-F0
 for 59498 <at> debbugs.gnu.org; Sat, 26 Nov 2022 17:11:59 -0500
Received: by mail-pg1-f172.google.com with SMTP id h33so1738133pgm.9
 for <59498 <at> debbugs.gnu.org>; Sat, 26 Nov 2022 14:11:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=kTeUzIeEBS9AealVTybmBRWmzN1ZR9Spj979j6vZJDQ=;
 b=jswTZ3rrR53Ku6at7rqiix4ZZgzxxWRMYT9xq6uRz1hPtOdIRUrAlZsedLwoi5YK8h
 UlTRTgyEt13YjwOGRDkbjaNasKX0/b2VBB2F+cSNT1hyOiYLTot+ksVYvDImPxDasBax
 BcccnMiyWqofCX9f/ywNfQi4M933Q1R4qDUdDfLMfOCcF6PMxsGBg8p1UOp+Ba4v3mG/
 bgnZkVM021FccGCe5vsv3k3O0qwdh5bp/5zy8k9esSrZpF6x/teQknX6D1mbdDXGoE6J
 UogO8KTXoSpmmWK5zagYmJ8tVYei/HlIAXyGseQEzZGfObnjOerfWoccML7ROQ2lzjED
 2H2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=kTeUzIeEBS9AealVTybmBRWmzN1ZR9Spj979j6vZJDQ=;
 b=kkjGYB4CY4Gbi0sQrtaR0E9QvF5PhWutly0otZvXgcMv/gU5hRimJo1pkk8StJtF+b
 siqMviOMSDRgCfhfpGDfMoLaSy97kyhNEGeNRB3RNbPFwiL8F3BRzv21GxI91B4ADBad
 BI9oAm2rGkZSkDJ2lRd4mkMd9NDyd3UdvsUO6iU2GgI16zOY4Cz+HniqKTX00y5JN6o+
 COVUOgVh3bmQ0zV5yqoBwtww9a/mDbtxycTcyWrbF+lwvC3wpmAV3fW9o9fKCOPZ0AJP
 K59uGCgTS8K69KlD16uY3HIW0CxPTw4fjEI2LN5a0cVGjuvfnyTYVVvB9edEYDbaKczV
 tkbw==
X-Gm-Message-State: ANoB5pk22UJFVoHrkCu/5hNAdf7n0XLwo6XNQBTa9tCcGL8iqEJrsxNV
 ImVLx24mgoTO3vpXT6ya4mg=
X-Google-Smtp-Source: AA0mqf5UmzNecsvOIi7Uua8hosuA46MiGP/Eirtzswa7f79Ce9SnDkhH7eF25IdqAONGeVzeiYbhGw==
X-Received: by 2002:aa7:84c7:0:b0:574:9b8d:1873 with SMTP id
 x7-20020aa784c7000000b005749b8d1873mr12667054pfn.75.1669500710353; 
 Sat, 26 Nov 2022 14:11:50 -0800 (PST)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 i5-20020a17090a2a0500b001fe39bda429sm4940639pjd.38.2022.11.26.14.11.49
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 26 Nov 2022 14:11:49 -0800 (PST)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <838rjyt15i.fsf@HIDDEN>
Date: Sat, 26 Nov 2022 14:11:48 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <5ADA88E0-A105-47B5-B590-2591253781C1@HIDDEN>
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 <838rjyt15i.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59498
Cc: Randy Taylor <dev@HIDDEN>, aqua0210@HIDDEN, 59498 <at> debbugs.gnu.org,
 mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Nov 26, 2022, at 3:18 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> Cc: Yuan Fu <casouri@HIDDEN>, 59498 <at> debbugs.gnu.org,
>> Daniel Mart=C3=ADn <mardani29@HIDDEN>
>> Date: Thu, 24 Nov 2022 14:39:19 +0000
>> From: Randy Taylor <dev@HIDDEN>
>>=20
>> diff --git a/lisp/progmodes/c-ts-mode.el =
b/lisp/progmodes/c-ts-mode.el
>> index fc35d9aedda..48f504214e2 100644
>> --- a/lisp/progmodes/c-ts-mode.el
>> +++ b/lisp/progmodes/c-ts-mode.el
>> @@ -570,6 +570,8 @@ c++-ts-mode
>>   (setq-local comment-start "// ")
>>   (setq-local comment-start-skip "\\(?://+\\|/\\*+\\)\\s *")
>>   (setq-local comment-end "")
>> +  (setq-local treesit-comment-start (rx "/" (or (+ "/") (+ "*"))))
>> +  (setq-local treesit-comment-end (rx (+ (or "*")) "/"))
>>=20
>>   (treesit-parser-create 'cpp)
>=20
> Thanks, but this doesn't look right to me: why should c++-ts-mode set
> variables for treesit.el?  It is more likely that treesit.el should =
use the
> buffer-local values of comment-start and comment-end instead, and fall =
back
> on generic values (if they make sense) only if the local values are =
not set.
>=20
> Yuan, WDYT?

I added treesit-comment-start/end to help indenting comments. So this is =
the correct way to use them. The following comment explains why I =
created new variables:

;; `comment-start' and `comment-end' assume there is only one type of
;; comment, and that the comment spans only one line.  So they are not
;; sufficient for our purpose.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 26 Nov 2022 11:17:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 26 06:17:57 2022
Received: from localhost ([127.0.0.1]:37987 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oytC1-0005ih-Jx
	for submit <at> debbugs.gnu.org; Sat, 26 Nov 2022 06:17:57 -0500
Received: from eggs.gnu.org ([209.51.188.92]:53566)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1oytBy-0005iR-Jz
 for 59498 <at> debbugs.gnu.org; Sat, 26 Nov 2022 06:17:57 -0500
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 <eliz@HIDDEN>)
 id 1oytBp-0001Bb-Dx; Sat, 26 Nov 2022 06:17:45 -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=zNy7mi1yOZqRnCPL1H/MGt7doMR43z68GHWLQ3CUsMc=; b=rBKFHpCNjOXNjresJucC
 lp+6xkWaeKHPdotrUQm8w+WWRbdiQ9US2ACO5oV1R+4eqBez7vxEq9ZMlU2j8dmAJPyFXQb1iNl3c
 fIO8H9BjMPdkmIr3CfXYIrvckq8eU36Dt4JbEU3wjIuR2HfWY0DrbtM4d+N+4y9gsMMoaNbR/woSD
 ctgsD+FpD3448PGhgp2E41iI+HDwXltAWfBYIFPtN8HyRCrb+ZBruoj6FPnvFh43gbJyUGvitGsv5
 /6GoQIXimGUvocWReLtckz+18Z2my+jiSU4XU2hs8TJ/mfAhW9geK8qUPLKzvz+QrqGORm0CiXsob
 fLJqkq35bbEx+Q==;
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 <eliz@HIDDEN>)
 id 1oytBl-0004Is-TD; Sat, 26 Nov 2022 06:17:43 -0500
Date: Sat, 26 Nov 2022 13:18:01 +0200
Message-Id: <838rjyt15i.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Randy Taylor <dev@HIDDEN>, Yuan Fu <casouri@HIDDEN>
In-Reply-To: <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
 (message from Randy Taylor on Thu, 24 Nov 2022 14:39:19 +0000)
Subject: Re: bug#59498: 29.0.50;
 c++-ts-mode get wrong-type-argument error when enabled
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59498
Cc: aqua0210@HIDDEN, 59498 <at> debbugs.gnu.org, mardani29@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Yuan Fu <casouri@HIDDEN>, 59498 <at> debbugs.gnu.org,
>  Daniel Martín <mardani29@HIDDEN>
> Date: Thu, 24 Nov 2022 14:39:19 +0000
> From: Randy Taylor <dev@HIDDEN>
> 
> diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
> index fc35d9aedda..48f504214e2 100644
> --- a/lisp/progmodes/c-ts-mode.el
> +++ b/lisp/progmodes/c-ts-mode.el
> @@ -570,6 +570,8 @@ c++-ts-mode
>    (setq-local comment-start "// ")
>    (setq-local comment-start-skip "\\(?://+\\|/\\*+\\)\\s *")
>    (setq-local comment-end "")
> +  (setq-local treesit-comment-start (rx "/" (or (+ "/") (+ "*"))))
> +  (setq-local treesit-comment-end (rx (+ (or "*")) "/"))
>  
>    (treesit-parser-create 'cpp)

Thanks, but this doesn't look right to me: why should c++-ts-mode set
variables for treesit.el?  It is more likely that treesit.el should use the
buffer-local values of comment-start and comment-end instead, and fall back
on generic values (if they make sense) only if the local values are not set.

Yuan, WDYT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 25 Nov 2022 12:56:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 25 07:56:54 2022
Received: from localhost ([127.0.0.1]:33818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oyYGE-0004eu-4S
	for submit <at> debbugs.gnu.org; Fri, 25 Nov 2022 07:56:54 -0500
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 <aqua0210@HIDDEN>) id 1oyYG8-0004eY-41
 for 59498 <at> 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=
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
Message-ID: <tencent_0F5EB44A8090D03772C1B7D69E3761E4FC09@HIDDEN>
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
 HGsmddiI8ATsENGoImeYxZz3SI2wSo8DmNZLDKLRsYf+GNWRGeXjB24pEzUKTdJvMNZuP9e7bF6M
 +edHnYpIGmLRkze41jI/hBOL5x5ED3YVOhaCTtQCcfJJ910aHBZ63sWim3n2GXGpFmveVsAcV09y
 ofegnhi/qPpE+j/Isoor+GffK5g9SDZOkWr+PMFODUuo5vxw4IBeazz73X2qoj3dRYaNvD2CQ=
From: Eason Huang <aqua0210@HIDDEN>
To: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
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")
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
 <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
Date: Fri, 25 Nov 2022 20:56:36 +0800
Message-ID: <m2pmdb5h17.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 3.9 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Randy Taylor <dev@HIDDEN> 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 dif [...] 
 Content analysis details:   (3.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [162.62.57.49 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [162.62.57.49 listed in wl.mailspike.net]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (aqua0210[at]foxmail.com)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (aqua0210[at]foxmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP
 addr 1)
X-Debbugs-Envelope-To: 59498
Cc: Yuan Fu <casouri@HIDDEN>, 59498 <at> debbugs.gnu.org,
 Daniel =?utf-8?Q?Mart=C3=ADn?= <mardani29@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Randy Taylor <dev@HIDDEN> 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 dif [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [162.62.57.49 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [162.62.57.49 listed in wl.mailspike.net]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
                             in digit (aqua0210[at]foxmail.com)
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (aqua0210[at]foxmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP
                             addr 1)

Randy Taylor <dev@HIDDEN> writes:

> On Wednesday, November 23rd, 2022 at 05:53, Eason Huang <aqua0210@HIDDEN> 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 _) #<bytecode 0x18b0dfc57c56ebd8>)(nil #<treesit-node (compound_statement) in 11-15> 13)
>>
>> #f(compiled-function (fn) #<bytecode 0x188c898311f019af>)(#f(compiled-function (&rest _) #<bytecode 0x18b0dfc57c56ebd8>))
>>
>> mapcar(#f(compiled-function (fn) #<bytecode 0x188c898311f019af>)
>> (#f(compiled-function (n parent &rest _) #<bytecode
>> 0x149caa867664fee9>) #f(compiled-function (&rest _) #<bytecode
>> 0x18b0dfc57c56ebd8>)))
>>
>> #f(compiled-function (node parent bol &rest _) #<bytecode -0xb869f433d8fc770>)(nil #<treesit-node (compound_statement) in 11-15> 13)
>>
>> treesit--simple-indent-eval(((and (parent-is "comment") comment-end) nil #<treesit-node (compound_statement) in 11-15> 13))
>>
>> treesit-simple-indent(nil #<treesit-node (compound_statement) in 11-15> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.
Added tag(s) patch. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 24 Nov 2022 14:39:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 24 09:39:57 2022
Received: from localhost ([127.0.0.1]:57839 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oyDOA-0006cz-G0
	for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 09:39:57 -0500
Received: from mail-4317.proton.ch ([185.70.43.17]:64313)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dev@HIDDEN>) id 1oyDO5-0006cj-Se
 for 59498 <at> debbugs.gnu.org; Thu, 24 Nov 2022 09:39:39 -0500
Date: Thu, 24 Nov 2022 14:39:19 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev;
 s=protonmail2; t=1669300770; x=1669559970;
 bh=xDHHquP4YrkEnG03/44tOdWgCyNf3NQwZk/g+Ixhh4w=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=p8erNDaG05xYjQqOWp1967wvOgy66Kazy9xK0vYOhFGfC6dESmA3zHERu4CHjiZ+S
 I3ovMgwGc/jTh+ohvBPHXk7gljvPJCEmCn3Rbh1c7T0etanQ+ElnIuXzSygJpqwte2
 oiGmaW6gTbA9EpImTU8HnucrKIX1h/QKDieIV/01qcUpZOCKELaB03v56tXCag2xoy
 hHlN/1EaxbOcxrhLaUD3FbecBT03FL72cufP8OvJggoYNUBbRPUMsj+nmMnZ8M2CDg
 bCQ6+Ux5DJrXAsWfuCDibVNNSj4BG8yUTuy99unTTN+8qRIyZPrWl5m/2rhiEOtzpa
 K/TOs0+iamw/Q==
To: Eason Huang <aqua0210@HIDDEN>
From: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#59498: 29.0.50;
 c++-ts-mode get wrong-type-argument error when enabled
Message-ID: <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev>
In-Reply-To: <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
 <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
Feedback-ID: 44397038:user:proton
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="b1_NZKpQ6PMhtpRblu1fxePHyUWYua8RLVmblHekUw1kU"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 59498
Cc: Yuan Fu <casouri@HIDDEN>, 59498 <at> debbugs.gnu.org,
 =?utf-8?Q?Daniel_Mart=C3=ADn?= <mardani29@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.

--b1_NZKpQ6PMhtpRblu1fxePHyUWYua8RLVmblHekUw1kU
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Wednesday, November 23rd, 2022 at 05:53, Eason Huang <aqua0210@HIDDEN=
om> wrote:

>=20
>=20
> But when I try to indent code,
> it will raise the error (Wrong type argument: stringp, nil) again.
> It should be a different bug.
>=20
> Steps to reproduce:
>=20
> After the step 4, try to type the code as below:
>=20
> int main(){
> <-- put you cursor at the first colum 1, and then hit TAB(indent-for-tab-=
command)
>=20
> }
>=20
> after you hit TAB at the above code, you will get the backtrace error as
> below:
>=20
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> looking-at(nil t)
> #f(compiled-function (&rest _) #<bytecode 0x18b0dfc57c56ebd8>)(nil #<tree=
sit-node (compound_statement) in 11-15> 13)
>=20
> #f(compiled-function (fn) #<bytecode 0x188c898311f019af>)(#f(compiled-fun=
ction (&rest _) #<bytecode 0x18b0dfc57c56ebd8>))
>=20
> mapcar(#f(compiled-function (fn) #<bytecode 0x188c898311f019af>) (#f(comp=
iled-function (n parent &rest _) #<bytecode 0x149caa867664fee9>) #f(compile=
d-function (&rest _) #<bytecode 0x18b0dfc57c56ebd8>)))
>=20
> #f(compiled-function (node parent bol &rest _) #<bytecode -0xb869f433d8fc=
770>)(nil #<treesit-node (compound_statement) in 11-15> 13)
>=20
> treesit--simple-indent-eval(((and (parent-is "comment") comment-end) nil =
#<treesit-node (compound_statement) in 11-15> 13))
>=20
> treesit-simple-indent(nil #<treesit-node (compound_statement) in 11-15> 1=
3)
>=20
> 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
>=20
> --
> Eason Huang
>=20

The attached patch fixes it for me.
--b1_NZKpQ6PMhtpRblu1fxePHyUWYua8RLVmblHekUw1kU
Content-Type: text/x-patch; name=0001-Fix-c-ts-mode-indentation-Bug-59498.patch
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=0001-Fix-c-ts-mode-indentation-Bug-59498.patch

RnJvbSA5NGQ3YmQ3NmI4ZWM0ODM3OGIwNDRmZjY5MWZiNWVmMmY5Njk4YzA4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBSYW5keSBUYXlsb3IgPGRldkByanQuZGV2PgpEYXRlOiBUaHUs
IDI0IE5vdiAyMDIyIDA5OjMxOjUzIC0wNTAwClN1YmplY3Q6IFtQQVRDSF0gRml4IGMrKy10cy1t
b2RlIGluZGVudGF0aW9uIChCdWcjNTk0OTgpCgoqIGxpc3AvcHJvZ21vZGVzL2MtdHMtbW9kZS5l
bCAoYysrLXRzLW1vZGUpOiBTZXQgdHJlZXNpdC1jb21tZW50LXN0YXJ0CmFuZCB0cmVlc2l0LWNv
bW1lbnQtZW5kLgotLS0KIGxpc3AvcHJvZ21vZGVzL2MtdHMtbW9kZS5lbCB8IDIgKysKIDEgZmls
ZSBjaGFuZ2VkLCAyIGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9saXNwL3Byb2dtb2Rlcy9j
LXRzLW1vZGUuZWwgYi9saXNwL3Byb2dtb2Rlcy9jLXRzLW1vZGUuZWwKaW5kZXggZmMzNWQ5YWVk
ZGEuLjQ4ZjUwNDIxNGUyIDEwMDY0NAotLS0gYS9saXNwL3Byb2dtb2Rlcy9jLXRzLW1vZGUuZWwK
KysrIGIvbGlzcC9wcm9nbW9kZXMvYy10cy1tb2RlLmVsCkBAIC01NzAsNiArNTcwLDggQEAgYysr
LXRzLW1vZGUKICAgKHNldHEtbG9jYWwgY29tbWVudC1zdGFydCAiLy8gIikKICAgKHNldHEtbG9j
YWwgY29tbWVudC1zdGFydC1za2lwICJcXCg/Oi8vK1xcfC9cXCorXFwpXFxzICoiKQogICAoc2V0
cS1sb2NhbCBjb21tZW50LWVuZCAiIikKKyAgKHNldHEtbG9jYWwgdHJlZXNpdC1jb21tZW50LXN0
YXJ0IChyeCAiLyIgKG9yICgrICIvIikgKCsgIioiKSkpKQorICAoc2V0cS1sb2NhbCB0cmVlc2l0
LWNvbW1lbnQtZW5kIChyeCAoKyAob3IgIioiKSkgIi8iKSkKIAogICAodHJlZXNpdC1wYXJzZXIt
Y3JlYXRlICdjcHApCiAKLS0gCjIuMzguMQoK

--b1_NZKpQ6PMhtpRblu1fxePHyUWYua8RLVmblHekUw1kU--





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 23 Nov 2022 10:53:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 23 05:53:46 2022
Received: from localhost ([127.0.0.1]:53846 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oxnNx-0007O2-Ib
	for submit <at> debbugs.gnu.org; Wed, 23 Nov 2022 05:53:45 -0500
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 <aqua0210@HIDDEN>) id 1oxnNt-0007Nk-Op
 for 59498 <at> 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=
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
Message-ID: <tencent_5B8F5CDFCB4A491D92D8861678E1DADCE606@HIDDEN>
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+
 vEXLjXQi1bPqcG1GXd3JQXz1G3bBmPWQLeD8SwQrrxhijcKt5oQaNmWSYZcWCst9m/QHcw9Y9cAd
 7JQpqocDrfiCRsWNChFMGJVVFBxIiINkj1pQ0DDSUtX81QsQ57GldPOWpivS9g0fB1tSg/P4A1hl
 gQCjwoDzooCk2icdWoNqT6KSrpqz3P5pfYXavcKsY=
From: Eason Huang <aqua0210@HIDDEN>
To: Daniel =?utf-8?Q?Mart=C3=ADn?= <mardani29@HIDDEN>
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
In-Reply-To: <m1cz9e9i1m.fsf@HIDDEN> ("Daniel =?utf-8?Q?Mart=C3=ADn=22's?=
 message of "Wed, 23 Nov 2022 09:44:21 +0100")
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
 <m1cz9e9i1m.fsf@HIDDEN>
Date: Wed, 23 Nov 2022 18:53:29 +0800
X-OQ-MSGID: <m2o7sy3psm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 3.9 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Daniel Martín 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 [...] 
 
 Content analysis details:   (3.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [203.205.221.235 listed in list.dnswl.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
                             in digit (aqua0210[at]foxmail.com)
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (aqua0210[at]foxmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP
                             addr 1)
X-Debbugs-Envelope-To: 59498
Cc: 59498 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Daniel Martín 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 [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [203.205.221.235 listed in list.dnswl.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
                             in digit (aqua0210[at]foxmail.com)
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (aqua0210[at]foxmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP
                             addr 1)

Daniel Mart=C3=ADn <mardani29@HIDDEN> writes:

> Eason Huang <aqua0210@HIDDEN> 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 _) #<bytecode 0x18b0dfc57c56ebd8>)(nil #<tree=
sit-node (compound_statement) in 11-15> 13)
  #f(compiled-function (fn) #<bytecode 0x188c898311f019af>)(#f(compiled-fun=
ction (&rest _) #<bytecode 0x18b0dfc57c56ebd8>))
  mapcar(#f(compiled-function (fn) #<bytecode 0x188c898311f019af>) (#f(comp=
iled-function (n parent &rest _) #<bytecode 0x149caa867664fee9>) #f(compile=
d-function (&rest _) #<bytecode 0x18b0dfc57c56ebd8>)))
  #f(compiled-function (node parent bol &rest _) #<bytecode -0xb869f433d8fc=
770>)(nil #<treesit-node (compound_statement) in 11-15> 13)
  treesit--simple-indent-eval(((and (parent-is "comment") comment-end) nil =
#<treesit-node (compound_statement) in 11-15> 13))
  treesit-simple-indent(nil #<treesit-node (compound_statement) in 11-15> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at 59498 <at> debbugs.gnu.org:


Received: (at 59498) by debbugs.gnu.org; 23 Nov 2022 08:44:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 23 03:44:35 2022
Received: from localhost ([127.0.0.1]:53544 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oxlMx-0007to-Ik
	for submit <at> debbugs.gnu.org; Wed, 23 Nov 2022 03:44:35 -0500
Received: from sonic314-21.consmr.mail.ir2.yahoo.com ([77.238.177.147]:40919)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mardani29@HIDDEN>) id 1oxlMs-0007tW-OX
 for 59498 <at> debbugs.gnu.org; Wed, 23 Nov 2022 03:44:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048;
 t=1669193063; bh=5V7X7ymvpFfWoTxePI86tESDzYRMbZxTx+lHAdJUmXg=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To;
 b=esyfINC9RDBvkAa0vnC7XnPNcnfW7reBhGjfTsdZpL8daCuhRzkBhaXgWPc9mOQv9ADnRiWOmGXRuwSC4yy8GSy12QJl1U11O9I33NYmZM1oaL4k1jxTaHmLEDD3BoZJrI3n9HFpzjaOdV7ooZsF49ZdUM4lt1QM+75wzZCBcKjM33J1HpPouCieA4Mo4AeaPn90Cju/HxC4GqbKKm5bCUK4klzbxxGjITHk0Zjb74ORk7RZQUad8IT5GwY+O10pwy6qflQZ1LUwX86CYRLidxDNslifDVP5f/I71vs7X6ng7S3Gn44yPcEaklnMB8u5eoCFSarsW7bayd0fEiBR9w==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1669193063; bh=WbDwL0IMu6MEYaq/ZtoTJSuFa6/wLEhfLPisNrIXFQw=;
 h=X-Sonic-MF:From:To:Subject:Date:From:Subject;
 b=qRWwm5LA8ZFh8PooMJ8sTmur2J1CpyHCwGSkeTE7/H7Pe7ttDEp2STmgLtFH0hWymGN8IIG0xPKoelxkPU8SRllz9vCE89eUDZSiw1We55YTaUauHo7Uyuf7VOeHDsnNRtYHMOVg21Pwmy6vgowsBYZqfuY/stXdQYuP9Bu/b1jaS8kB7Rngi9erh1qNhfXE1zfuffjreY+nec7uUODiTWPqDZZ/oVuO+gqUoy77fXMKIQAAnKNaBlk9b5AmGDXrC740+mqBgtYN1kXGiFR3uuG12zvtsHuLneuKHKBihZHjl2gMjQbhidmdTHpDJM89k0tm1vdpF64NVHxFskR3Rw==
X-YMail-OSG: B6lpzuEVM1nIsNsvZpUXIqKMHb0q0YO5zC_t3jBEfBaWwP3P7JJafYlGhIlRWzw
 iQnQbAY3thjyWKyJe9jZH_tvXwt6kw5B.kI7plkcSn72G1LCwbi4CPEOaE03IpxK9r8rfuXCQ2kp
 MnjQ8spN3YvVyKB936kRd3yprTR1t8ZR3ISyoAJinONODQTNyKONjggZ5zzs1ZMwywkL8wsp.TUk
 lf3GNW7z3__ntkzhCCd1T1hezhXMXhgDLHpO7Di8zhbDJPforvA3hOGq25V7y7Ep6qqmGb6_A7eK
 gBmfUcB1azBpDSQPOWExokG17p3cvHWhRAxcefduTz7by7ZmtwZI44WOGgx.CufQcE_H5hPBz02d
 VJz205ERHHQsdVYtg4VfJdGiUvEkY1VTj2Bb2OXRl9DtNEQYJtOGv0mam9AK8f2zLX3c79vsI1pH
 whMw8UMZU0igWRjGP6pzNoNQN8S9MZrTYeBXIiclybTC5EmGJtbglW6_fZGpBrdR4OWFRrEAGlbf
 fDv8sj0QhIweYMxLjMgK8DQMw.jcerpowvYCRDcR4O1xdwVH0m0bA8sso2Boj5BtLUim_wN1z3EN
 KN909HXrZ.WagIh_yxkNqllOwdsujPlIkoiy9Zxa7s9fxRBi6aV6k297vlsWAVhKRL.fSTtkhdMb
 _PgWOWrWbPxjLw6.n4CDQxYw4nqmreE3V.Q1hM2fmTBfBs4EKZO9vCApFtFWUjDCkIebInzexgcu
 XNjcyXIOW2STPsl36fABeBhNkb5d1IGulp49lI7brQMAAlm_0nwcmf67RDwYHTpa6284_NU0ogwH
 mk5jwGHZlREY3j6PUbR17i13oQV6UyDsjlUrhd3vypAc5PzEMLCT5zYuqxEHkerGlXFBDzuC6N_W
 wVHufpRATVO5rrmYZKpxWgiTLnmE4wShfzKcjOLH9H2NPIYnu2oV0Z3C2SZS__3AsUYS.1s0Xb81
 jyFrv1YZgByffvz2kkhrE0xwTkvnkiYP4g6M75AOjI7zGHvOEZmnqPR9oVH0JJ8QRv_6mJB_ym2J
 1mTtACIxBahM2cV6q0oQjZOAt.ytQ1IHDXQfx9sXwcV1avaW..SLejfMtJjFqeLGAU5vJMpcwA4G
 3SBGfsc7b0HtIV_IiJ7xd3NnN140q0TtbCCxGNYULQ3CT6_VCTcmeZYTDE2h5zjFYnIKxPyDDLkP
 LSWS40DgcbQn6y8UqlumMMSAEVIUjKUrtzGRrAcBT6DRZYeik9Z5iD9yz.Zco0EXz_CYhBwp7v01
 hyJmb4jwyhDTq.p2Xr9.lwLJo_3SYmi8pFsXdzdL1DLk5KmWEALfJtmoJnrWq6_453kHD1KannDA
 Gehw.cc2vbVrptQXg5qceo8ckqlP8V6si_dKF1tvlj4hDvilERKzBCt75DiF6khR63tw8fqEITqD
 TUlv1nxBGJk5ieUHuGl.xwPQ46vEnKOHs1M7pPdQwaKwJK5chMb31SZBfZyWFGHymkRqDvyBbdU6
 PakZkd06qbKG6Tpkn_X0kdBU07O4gQGgOenONyf9Mn4.hW8Wr_PBmcdE8SItgPjGOxyY_wupg872
 pmTRIHXBAwxUSmt_Ys34F3bmNcmzJXJSSoIF0mQnV03k4FBDtX30kGlMPF8vp3GFKHN7uRHuQ5WU
 15QQEDe3VoI.146mRtsiI016ua1DTJd97zokAPRJwFBR1FtkKUlu_BqceGy_qQ1U1w6KKK8VSbSA
 _qS0wlpGkktjSlWqlwPLzaDpQydiaryEsyBbm.5_RUc57RyYvrPVVRDEYys_zH6YOQxZb7fEEF5L
 RKtU4eFyFvVqY_WYBTLF5cgf03c.459ZcC3kF2IWaYvZHi3Mk_Rf0mfThawUDl8OrsVTW2YSillw
 6vOwossuqQ6BAf3Yz.kyHpLLRhDJ0RN3OfjseMpmdUiDhJFW_bkLt4H4IdVbH4cG3weVS420pSuX
 yZVE9w6qe_fdB4sQITzpafMDZP5ev33Tha4Lc7CkULCMzuxT3aUdMyuQO0NOYZOJ_C6bma8V78xQ
 vQPdcMkYV1FZhdWSvuQg6GYj0w7p1vc9CX8B4.ht8j_weUQuds.RhZlsPG8xnG..DfIPpmCYdyLB
 ltxaKe8__.pkwqY8L7cibIuh.X1QkiLiorYpbwPGwFVRCmKhhp2xky6b1lkse1k5_iRe4T_bj.G.
 I9J3Z5JnY08_MwA1mPuX27jbTC1KQ3D5agp8Up0_QMiUk6uxQn.x4.yhQkaNIcKQxej4T4TZLrXX
 5TXMq7WTQgFOdGjSgWPTGyhXacTE8YoKZpulzuUfZwzY-
X-Sonic-MF: <mardani29@HIDDEN>
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic314.consmr.mail.ir2.yahoo.com with HTTP; Wed, 23 Nov 2022 08:44:23 +0000
Received: by hermes--production-ir2-74cf6dc4df-7mz2f (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID 3985f3116c1f053ced2e59fbbf52be16; 
 Wed, 23 Nov 2022 08:44:22 +0000 (UTC)
From: =?utf-8?Q?Daniel_Mart=C3=ADn?= <mardani29@HIDDEN>
To: Eason Huang <aqua0210@HIDDEN>
Subject: Re: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error
 when enabled
References: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
Date: Wed, 23 Nov 2022 09:44:21 +0100
In-Reply-To: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN> (Eason
 Huang's message of "Wed, 23 Nov 2022 10:24:13 +0800")
Message-ID: <m1cz9e9i1m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Mailer: WebService/1.1.20863
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo
Content-Length: 963
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 59498
Cc: 59498 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Eason Huang <aqua0210@HIDDEN> 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 nil)
>   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/057901f55ad12ebbc9cf092dd6ad0f02539849f9

Could you try an Emacs build that contains commit c69858b3f0?  This is
the same bug as bug#59497.  Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Nov 2022 02:25:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 22 21:25:47 2022
Received: from localhost ([127.0.0.1]:53012 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oxfSM-0006ib-Tt
	for submit <at> debbugs.gnu.org; Tue, 22 Nov 2022 21:25:47 -0500
Received: from lists.gnu.org ([209.51.188.17]:54950)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <aqua0210@HIDDEN>) id 1oxfSI-0006iQ-58
 for submit <at> debbugs.gnu.org; Tue, 22 Nov 2022 21:25:45 -0500
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 <aqua0210@HIDDEN>)
 id 1oxfSI-0008KF-0B
 for bug-gnu-emacs@HIDDEN; Tue, 22 Nov 2022 21:25:42 -0500
Received: from out162-62-57-137.mail.qq.com ([162.62.57.137])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <aqua0210@HIDDEN>)
 id 1oxfS7-0003dP-7L
 for bug-gnu-emacs@HIDDEN; Tue, 22 Nov 2022 21:25:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com;
 s=s201512; t=1669170323;
 bh=TyOBFuIGhrrOmUmoKy0uI6lvcuhA7U5LhSl6KI0NKgY=;
 h=From:To:Subject:Date;
 b=toSwCZSec9Bz2+ZtijLXuk4kRPdt4eXytb0e/i/4Lae3l/6QigpeQ+ybk3kNn9rJh
 DJbO9J3BLSAMgAHXpSU1tTGF0l//na1k4TcUxDgQIcyJwilhT7uBV4Mqq07syP1+9Y
 XEmSFyxGbxaY0a0XT9/DgMriD3HvabLxFbofOHtk=
Received: from macbook ([114.82.35.56])
 by newxmesmtplogicsvrszc5-0.qq.com (NewEsmtp) with SMTP
 id 6119C271; Wed, 23 Nov 2022 10:24:17 +0800
X-QQ-mid: xmsmtpt1669170257t78eve668
Message-ID: <tencent_095AEEE6951CCD4B5C0938D2F7C63778D906@HIDDEN>
X-QQ-XMAILINFO: M53/rbMX6NuZAV+HANEIaNBINILYsSpfjOoiNmsT6Kt6f8QQSSTb7R/t93A/3u
 egkah2ItXCNOh6su8t9qhTfTNQcVgsuzKjvNj2yZajE2im5jlywXpiqseUbyc6Q+Mrp/XtiwJyDV
 4fbAzTR6q7APB8aCBV8A2HW4UO+BOcz0yzZxNC36fCw86VlPMSFiCFCyTXdd72aKexO2n510zfUk
 /R2uQwRQVv1APvvAF4KpfP2y1gcSN9DsAWjMfJUbnAgsmfDmmFB9VNQZpxKd3VsloY98xILHF/uX
 DjSwIbWB6j4HnZMK+92y4OJrMsBijjP/00q3DUhKB+Rjzm6hLBW6/hlzuchw4Pi8pl0ep3diSBOr
 yA9ZPThg2sBvVjfeCVvO7vGTxFR50WMcvmkkKTAzF4q7YAWhnmBx+mVydaswDAxa7R0GpNNechsW
 pxsGA4sPGHPFYgpTqftE912DJiZORMe8L75avM3vadPH7QaXHk33WzQkgymLERoDht2zuF3Rybuu
 guU1+vVKeHIdD9Q2CeH27SOVHcrwW47bzUuqYCN3BAItQOoBWw1U9d1MdzuseNFfIQL12WD9gGhJ
 H98hgDpFirHLJ63iROYC5yMUmHXlYE3WofKk6cL1eJPnO4nNu3cEru1jhmACA9jMNoe4GcUl6wxS
 xuueHLk8PIPDBZZFXYNniZzufPP5KyAqqUMKEwse20CET04SzPHjYyuhze5aVixMwZVyS4hx7xt9
 dzprrKmqZwhBRBg1qse6eatQ/CjECfmJjHvptTwskyVBhlyFiBVNToK8kEb44oCmK/JYZZtmUPlV
 x97w5TCOTJnDgP/In5GJBCcSjOvzUeeNBgeM3pfnlf1VWgX7HIKK7wgTRpQ1lPAzaTUxwOsnQFfL
 fMnM9CDyvEEGprsfcOIoZjTbr/vonX2gbATnxDDpmEdTJ207pA2vAZJSOn4CazaIWB3WcHn0bcve
 H0QHu31k81PAABriqp8FvK0/1R2U/8
From: Eason Huang <aqua0210@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled
Date: Wed, 23 Nov 2022 10:24:13 +0800
Message-ID: <m24juq9zn6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=162.62.57.137; envelope-from=aqua0210@HIDDEN;
 helo=out162-62-57-137.mail.qq.com
X-Spam_score_int: 11
X-Spam_score: 1.1
X-Spam_bar: +
X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25,
 FREEMAIL_FROM=0.001, HELO_DYNAMIC_IPADDR=1.951, RCVD_IN_DNSWL_NONE=-0.0001,
 RCVD_IN_MSPIKE_H2=-0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)


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 nil)
  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/057901f55ad12ebbc9cf092dd6ad0f02539849f9

----
Eason Huang


In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin22.1.0, NS
 appkit-2299.00 Version 13.0.1 (Build 22A400)) of 2022-11-23 built on
 macbook
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.0.1

Configured using:
 'configure --with-native-compilation=aot 'CPPFLAGS=-I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath
 /opt/local/lib/gcc12
 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
 -arch x86_64''

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Text

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns
radix-tree cl-print byte-opt debug backtrace find-func c-ts-mode treesit
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs cl-loaddefs comp comp-cstr warnings icons subr-x rx
cl-seq cl-macs gv cl-extra help-mode bytecomp byte-compile cl-lib
cus-start cus-load rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 124747 11782)
 (symbols 48 10326 0)
 (strings 32 29161 1312)
 (string-bytes 1 989243)
 (vectors 16 19575)
 (vector-slots 8 393723 16844)
 (floats 8 35 39)
 (intervals 56 419 0)
 (buffers 992 15))




Acknowledgement sent to Eason Huang <aqua0210@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#59498; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 30 Nov 2022 21:45:02 UTC

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