From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode Date: Sun, 05 Jan 2025 12:55:11 +0100 Message-ID: <877c79v5k0.fsf@thornhill.no> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> <86serhjco6.fsf@gnu.org> <3d0c4cf6-1bc7-440e-8354-961ba5736e0d@gutov.dev> <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> <120cbe49-c34f-4f56-a8fa-80fd2a2480c6@gutov.dev> <8178b607-8146-4798-8db8-2e08710b8cd5@gutov.dev> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33738"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 73978-done@debbugs.gnu.org To: Yuan Fu , Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 12:56:22 2025 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 1tUPF0-0008XR-5U for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 12:56:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUPEm-0006vR-NV; Sun, 05 Jan 2025 06:56:08 -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 1tUPEi-0006v5-Kx for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:56:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUPEg-0003ql-Cq for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:56:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=yNetwsueY9lazq4UbupFzPPeMv95LB81ko0OjkVQWF4=; b=u2GrmaDOydEP85sg8/M3UH0AcYTHTabRYnrXl3OyvWGWMWtYXRuEkMtmlLkK+RAQG+PGQYD14fGX0LHhDEl4mtQ3Dp9hmYje1ESn+oqhlVlOUo6LhXNWp6kEDUUxTpdAJox0klxItNF+ssbUARVnnlcN7f9PLG5JzVlvbwGEffpzHulTm+do9ARGHr2ZkM5mbs1tOJnHQ+DgJ7fOW/UyaWxnLetnldWxlDuQ2muKY5wZwkfhU5K58X+qGJ4CHx27xndfo6n9Z3pII17OZ/1HfvW8lhnFIRJAVlotdgr/USJTyka+X0c+Jps1L4D7JDYhRpH+/8ScLlzHI/tr2HrI2Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUPEg-0006UL-7p for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 06:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 11:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73978 X-GNU-PR-Package: emacs Original-Received: via spool by 73978-done@debbugs.gnu.org id=D73978.173607812524861 (code D ref 73978); Sun, 05 Jan 2025 11:56:02 +0000 Original-Received: (at 73978-done) by debbugs.gnu.org; 5 Jan 2025 11:55:25 +0000 Original-Received: from localhost ([127.0.0.1]:60222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUPE4-0006Sv-WD for submit@debbugs.gnu.org; Sun, 05 Jan 2025 06:55:25 -0500 Original-Received: from mx.kolabnow.com ([212.103.80.154]:38940) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUPE0-0006OL-LO for 73978-done@debbugs.gnu.org; Sun, 05 Jan 2025 06:55:24 -0500 Original-Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 20222209201D; Sun, 5 Jan 2025 12:55:14 +0100 (CET) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:references:in-reply-to:subject:subject :from:from:received:received:received; s=dkim20240523; t= 1736078113; x=1737892514; bh=yNetwsueY9lazq4UbupFzPPeMv95LB81ko0 OjkVQWF4=; b=V2x50+ox4Y3U5YY1yXoW2uB5wf7ZLkqothhnSwFFcV+ZGGGsPfF 08PtwQRgbe5k3/ez/VdEn0sCYf4Ni8NrP6iew54SA161Jl4oXZs+Y7k+yx2HtReI I8vWYU0KEzMj5iq7EVg+MWFdDt9tvQKOoQS160/I944JVXrONjqlZzI+3I19KL0/ U93bmCRJ/i3XgQiRfl6tuobwGQ7sLURQ1quSlFqjN0hCsdgZEPujNwbpYbe1B3k2 Eu3lh+yNg/URNqXeYgsFK07kecS7R9sVUK8bB6qeDTRu0VFfnOpUDl81Ty5KNw0A DRtVsUIcOq1NWR/V6dqI1WfFR/roqkaU9wQ== X-Virus-Scanned: amavis at mykolab.com Original-Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id bpwtrzflX1Nk; Sun, 5 Jan 2025 12:55:13 +0100 (CET) Original-Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id 182CC2092013; Sun, 5 Jan 2025 12:55:12 +0100 (CET) Original-Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id C7C752125AB9; Sun, 5 Jan 2025 12:55:12 +0100 (CET) In-Reply-To: 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:298552 Archived-At: Yuan Fu writes: >> On Dec 12, 2024, at 9:19=E2=80=AFAM, Dmitry Gutov wro= te: >>=20 >> On 12/12/2024 06:56, Yuan Fu wrote: >>> How hard is it to add a new syntax for this case? Or is there some way = to work around this? We can=E2=80=99t just not apply the string syntax, bec= ause if the =E2=80=9Ca=E2=80=9D is a parenthesis, etc, it would mess up the= parenthesis balancing after it. >>=20 >> Probably not very hard, but that seems like it'd affect the total set of= syntax classes - which means adding it to the manual, etc. >>=20 >>> Maybe just give it a whitespace syntax? >>=20 >> Right, in such cases I applied the "whitespace" or "punctuation" syntax = to the whole character span, like in https://github.com/dgutov/mmm-mode/blo= b/master/mmm-erb.el#L97 > > Thanks. I went with the whitespace trick and pushed my patch to master. > > Yuan FWIW, I believe this is a regression caused by later versions of the treesit grammar. What is talked about here was explicitly a goal for me to handle at least better than what it appears it has been for some time. IIRC they changed what nodes were applied as the jsx nodes quite dramatically some time ago. I'm not surprised there are issues after that, as most wasn't backward compatible Theo