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#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode Date: Sat, 9 Nov 2024 08:49:55 -0800 Message-ID: <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) 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="29368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Theodor Thornhill , 73978@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 17:52:22 2024 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 1t9ohB-0007Sd-3b for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 17:52:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9ogy-000257-96; Sat, 09 Nov 2024 11:52: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 1t9ogs-00024K-Sz for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:52:03 -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 1t9ogs-0001k7-Bd for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:52:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=D0gRw7Fy4TyYM/O8VBUaNRDrPT84WjXrYS+z1ZTMrCY=; b=G7C7SI5pfy4AUCBTexKq2DJDLfoGVbPibfL+M6dC+kqykjd0bDmbVNOduQoC9h5RTKixVsehqshp3VTfF0b8m3jqmbv6V3V1ZA+Vl1iaVhWDqP+ZOme94jBoM3JyRsKHvja4J0rnyf2wz3ODheh+VpXm3ls4oeW55ipaGSDIcBl9SjrHoxxvGUrcSE0sUO1Ke7mokFOu3FcBzl7DLVV6z2DGfk3j2AYASWF8UwahYvGoRaul0lRzrLpK1a7taSh25GGeIX7TLxPpMGihE1ixVYzO6RciNclcphXD4rE44mIuoqzrn6dnT1HFG5jp1794KYIKRRylvfKk2eHV5GT/lA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9ogr-0004tQ-Ri for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 16:52:01 +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-submit@debbugs.gnu.org id=B73978.173117107018720 (code B ref 73978); Sat, 09 Nov 2024 16:52:01 +0000 Original-Received: (at 73978) by debbugs.gnu.org; 9 Nov 2024 16:51:10 +0000 Original-Received: from localhost ([127.0.0.1]:54265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9og2-0004rs-5P for submit@debbugs.gnu.org; Sat, 09 Nov 2024 11:51:10 -0500 Original-Received: from mail-pf1-f180.google.com ([209.85.210.180]:59814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9og0-0004rk-Ed for 73978@debbugs.gnu.org; Sat, 09 Nov 2024 11:51:09 -0500 Original-Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-720cb6ac25aso2896450b3a.3 for <73978@debbugs.gnu.org>; Sat, 09 Nov 2024 08:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731171007; x=1731775807; darn=debbugs.gnu.org; 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=D0gRw7Fy4TyYM/O8VBUaNRDrPT84WjXrYS+z1ZTMrCY=; b=Wp54RkKJhf7Cj4DTCVS5ErDv0L3ISfNQJ1ePF3BZNcYl9Ul/UJOAAJx3cgP6Iaylda E4LJR60WCejh8Zz+MaRjlteEtpvufx0hE6oec9Z40MrnrUra7eI8APKUs83awyoiufYb nk6UOJkdpFrXaAzFlLAuyM2ZrRp6UH+tnHysqkabAod8yjQMP6+f317zrna6Zwg8/gQN Mo+QtIv8eREIR+Rb02C6jHhyex4FA67pm9nJHDLzZrPIpr8r0tE3X9jU1gGY6j8+4Azl cejgiEPzY2au8MzTu9M8HxJWKhAy0W/ODxVJG90KPyUAXbxNMfJGluTpCN9Jhf7VqKPP ASUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731171007; x=1731775807; 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=D0gRw7Fy4TyYM/O8VBUaNRDrPT84WjXrYS+z1ZTMrCY=; b=VT5vApFMrqqPSAXZLwQFvCT589L1xCR+ME9XZJEtr+ean63r1VZ9OU2x9OV025qkqj cV6uAgJXXMhdr3oM9fke7Tc+KF5kokFc/K0obF7WJdDzbDm/xd+5QXmdSRu9Qp/AXP1N kNEmbdttlacIiWSfltF/IEv7/2F+TOlSKVPX1l9xNZvChL8RgpYFckSsgdTExFfv7SRG mI0XXUCQbT47GYy4Zsz6V/0aZFWDYRae9g7AOXCKZi7FycS1KmvJVVW6j5xbcwDjPUys 0ul/u0WUZacNxCHRUEVphoLyjwUqcf2ncqgak6iTnZffJ3LGBMZhwPGyPf09tJ3pD7hD E5Tw== X-Forwarded-Encrypted: i=1; AJvYcCWZC2jBxmXK6+RzepqXwH6oRDKmdmZHV72DMWiuyj+MpGmgbFG1cqMtf1lnkTs31yZQXCIHag==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy2gZoSoXgim6BcU1CREJH4UfxEaj3ChZ9aGcifbtNMEzxe14YO OMWr8DnY7ipZCRaVc3QutrSsxjLwWhG94DLR3ZAZRQdix+MXMJ6S X-Google-Smtp-Source: AGHT+IF473sGTjD9Ex8vmxVzYAZxb2Z1SOKUTrJKn4Tx0gjPl2V8s1eFCQlNNrrVc6M6ZFNYi6s7cg== X-Received: by 2002:a05:6a21:78a5:b0:1cf:3c60:b8d3 with SMTP id adf61e73a8af0-1dc229afb7cmr11064696637.19.1731171007469; Sat, 09 Nov 2024 08:50:07 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:1524:1329:2a87:2c60]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7f41f65fd7asm5397221a12.83.2024.11.09.08.50.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Nov 2024 08:50:06 -0800 (PST) In-Reply-To: <8634k0ojpp.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) 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:295147 Archived-At: > On Nov 9, 2024, at 1:11=E2=80=AFAM, Eli Zaretskii = wrote: >=20 > Ping! Theo, can you answer Yuan's questions? I=E2=80=99ve been using my local fix at work for a while now and it = seems to work fine. I=E2=80=99ll make a patch and apply in a few days. Yuan >=20 >> Cc: theo@thornhill.no >> From: Yuan Fu >> Date: Wed, 23 Oct 2024 21:06:40 -0700 >>=20 >> X-Debbugs-CC: theo@thornhill.no >>=20 >> In tsx-ts-mode we use this query to apply syntax properties: >>=20 >>=20 >> (defvar tsx-ts--s-p-query >> (when (treesit-available-p) >> (treesit-query-compile 'tsx >> '(((regex pattern: (regex_pattern) = @regexp)) >> ((variable_declarator value: = (jsx_element) @jsx)) >> ((assignment_expression right: = (jsx_element) @jsx)) >> ((arguments (jsx_element) @jsx)) >> ((parenthesized_expression (jsx_element) = @jsx)) >> ((return_statement (jsx_element) = @jsx)))))) >>=20 >>=20 >> And then in tsx-ts--syntax-propertize-captures we mark everything >> enclosed by the captured jsx_element nodes in text fences. >>=20 >> Then for the following code >>=20 >> >>=20 >> All the func() and other code will be considered text because the = whole >> jsx tag () are wrapped in string fences. Theo, >> what=E2=80=99s the original intention for marking jsx_elements as = text? Can we >> only mark jsx_text as string? >>=20 >> Yuan >>=20 >>=20 >>=20 >>=20 >>=20