From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled Date: Wed, 30 Nov 2022 13:33:03 -0800 Message-ID: <72E27336-0B24-4C7A-A324-45F27A31AA36@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39539"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Randy Taylor , Eli Zaretskii , Stefan Monnier , 59498@debbugs.gnu.org, mardani29@yahoo.es To: aqua0210@foxmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 30 22:34:24 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p0Uim-0009y0-Fk for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 22:34:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0UiS-00030s-2S; Wed, 30 Nov 2022 16:34:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0UiQ-00030I-7p for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 16:34:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0UiP-0003TZ-VL for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 16:34:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0UiP-00023W-R6 for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 16:34:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2022 21:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59498 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59498-submit@debbugs.gnu.org id=B59498.16698439937886 (code B ref 59498); Wed, 30 Nov 2022 21:34:01 +0000 Original-Received: (at 59498) by debbugs.gnu.org; 30 Nov 2022 21:33:13 +0000 Original-Received: from localhost ([127.0.0.1]:35236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0Uhd-000238-84 for submit@debbugs.gnu.org; Wed, 30 Nov 2022 16:33:13 -0500 Original-Received: from mail-pj1-f48.google.com ([209.85.216.48]:38565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0Uha-00022z-Hz for 59498@debbugs.gnu.org; Wed, 30 Nov 2022 16:33:11 -0500 Original-Received: by mail-pj1-f48.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so3246429pjc.3 for <59498@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) Original-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) X-Mailer: Apple Mail (2.3696.120.41.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249574 Archived-At: Eason Huang writes: > Yuan Fu writes: > >>> On Nov 26, 2022, at 11:24 PM, Eli Zaretskii wrote: >>> >>>> From: Stefan Monnier >>>> Cc: Yuan Fu , dev@rjt.dev, = aqua0210@foxmail.com, >>>> 59498@debbugs.gnu.org, mardani29@yahoo.es >>>> 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