From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione 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 09:13:41 -0500 Message-ID: <1CFB05F0-CF5E-4E3A-BFE4-96CD00198974@dancol.org> 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> <877c79v5k0.fsf@thornhill.no> 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="28105"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android Cc: Eli Zaretskii , 73978-done@debbugs.gnu.org To: theo@thornhill.no, 73978@debbugs.gnu.org, casouri@gmail.com, dmitry@gutov.dev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 15:14:24 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 1tUROZ-0007CT-Tf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 15:14:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUROF-0002MR-Du; Sun, 05 Jan 2025 09:14:03 -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 1tUROE-0002MB-8o for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 09:14:02 -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 1tUROD-0000tP-W3 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 09:14:02 -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:References:In-Reply-To:From:Date:To:Subject; bh=AQYd9LYH/dCShcAk/IRcVjnfA1H6dfKgdaRfu3I8m5U=; b=KYZvJOC2BjRw9TqHPv2qTaiqH9WCagNQhk30FyNCB8d7mF8kCnxPA+oTzggQ2yJx9cZtkjFUNuEXR3HMkydyqa7xb2I0gj/8Ei67ytgUmVdxmgeHS52bQ2Yh07ofUWt/vuaYsInGETFNBv3v5+VS5IuYvFkswsWw8WxgATE2pMlXp+T+AlZjE81kv82H+R3EaYdMZFomNwuu+oXvBC9LX2vixVyfEC5u8SiqLLh2laRnTWGw/aIJEMZ9jnPrxMEaBmqTBbh8bjFLfVXtwocUuAKFqNzJIpnf//LV3HYNgIll16s3gXlhgTQViPMqrdu+X2HbODYJ4O+jjdOcoe59+A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUROD-0005MG-Mc for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 09:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 14:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73978 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Theodor Thornhill , "Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors" , Yuan Fu , Dmitry Gutov Original-Received: via spool by submit@debbugs.gnu.org id=B.173608643720577 (code B ref -1); Sun, 05 Jan 2025 14:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jan 2025 14:13:57 +0000 Original-Received: from localhost ([127.0.0.1]:60437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tURO9-0005Lp-H7 for submit@debbugs.gnu.org; Sun, 05 Jan 2025 09:13:57 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:35610) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tURO8-0005LM-5d for submit@debbugs.gnu.org; Sun, 05 Jan 2025 09:13:56 -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 1tURO1-0002Lc-TV for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 09:13:49 -0500 Original-Received: from dancol.org ([2600:3c01:e000:3d8::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tURNz-0000rY-Di; Sun, 05 Jan 2025 09:13:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: References:In-Reply-To:Subject:CC:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=AQYd9LYH/dCShcAk/IRcVjnfA1H6dfKgdaRfu3I8m5U=; b=YRf91xlZrhQKkLKm9hm33R092d JWVA1Bi/UJyrYSaEfv3ezDPw0ej2ieQZ3K3/kXIbLjqnzcvFPrziw0vMo6vFRqiXc+nTGiHbM8FyH gx+AK39FqSYOuBw6P7OcV9x/7fFMEitT1cQ9IZEE09UGKGeVEQobf+GXZrnTsE2w0C3KugSOzkx82 /KsbF+K/PXTlkL3Rk/hbLqUW+OYMD/CSXzvrm7ppynH5rG94Pn+bdONInB+wODKT2E9EwfN2FXeo4 kE0fKm8mtN7QgRoM0d9v5r+gMHaN2TJQnI6F6Shah0eaK6N1jeRWdOGfloCN0CNWdBLzC9Jc2nf0o S0OFJzpg==; Original-Received: from 2603-9001-4203-1ab2-755d-99b8-dc0b-6bff.inf6.spectrum.com ([2603:9001:4203:1ab2:755d:99b8:dc0b:6bff]:43442 helo=[IPv6:::1]) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tURNv-0003qy-2t; Sun, 05 Jan 2025 09:13:44 -0500 In-Reply-To: <877c79v5k0.fsf@thornhill.no> Received-SPF: pass client-ip=2600:3c01:e000:3d8::1; envelope-from=dancol@dancol.org; helo=dancol.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:298566 Archived-At: On January 5, 2025 6:55:11 AM EST, "Theodor Thornhill via Bug reports for = GNU Emacs, the Swiss army knife of text editors" = wrote: >Yuan Fu writes: > >>> On Dec 12, 2024, at 9:19=E2=80=AFAM, Dmitry Gutov = wrote: >>>=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 wa= y to work around this? We can=E2=80=99t just not apply the string syntax, b= ecause if the =E2=80=9Ca=E2=80=9D is a parenthesis, etc, it would mess up t= he parenthesis balancing after it=2E >>>=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=2E >>>=20 >>>> Maybe just give it a whitespace syntax? >>>=20 >>> Right, in such cases I applied the "whitespace" or "punctuation" synta= x to the whole character span, like in https://github=2Ecom/dgutov/mmm-mode= /blob/master/mmm-erb=2Eel#L97 >> >> Thanks=2E I went with the whitespace trick and pushed my patch to maste= r=2E >> >> Yuan > >FWIW, I believe this is a regression caused by later versions of the >treesit grammar=2E 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=2E IIRC they changed what nodes were applied as the jsx nodes quite >dramatically some time ago=2E I'm not surprised there are issues after >that, as most wasn't backward compatible Hrm=2E