From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode Date: Sat, 09 Nov 2024 11:11:14 +0200 Message-ID: <8634k0ojpp.fsf@gnu.org> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73978@debbugs.gnu.org To: Yuan Fu , theo@thornhill.no Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 10:12:20 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 1t9hVz-00086Q-Sn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 10:12:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9hVo-0002wI-B7; Sat, 09 Nov 2024 04:12:09 -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 1t9hVi-0002vS-F9 for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 04:12: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 1t9hVi-0001U1-2a for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 04:12: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=Hnk97JWhgR2FJYIU5HxxaP4hpTHbXp2vzoyUnEdmRns=; b=Zk8EW5VuLF/GrnPw2VlVe6QC8aQNZM0G+AS++pUZ0h3uuZwB8Ny+QfsWs7zDKS/IIJzK/cTeD+hK7J5fyQO7kdRHHlF7RBuFlgxotevm4f+W8pX47sW9YDFMJ96fCEoKJl9PWq8PHRdt+PHiJuL3EG8wod/tYxNBjv0NqO7Vdla813rkip1O97dXgz0IL0Cn9kg69SXFXTUWof3IV3dQ0bHtKnYR8aYOanWDcsJ4SPFXu2foudB6lCPwBP7P5K3h1zseQocYzPYiGIVzLHSztNQ1sffLgqP8HKx5KRVFOAMP8zOxVpKQrJqr0IKtnNW2NP5h7oPRFPWrhZYDtxNWjg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9hVh-0001Kx-TC for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 04:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 09:12: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.17311434875094 (code B ref 73978); Sat, 09 Nov 2024 09:12:01 +0000 Original-Received: (at 73978) by debbugs.gnu.org; 9 Nov 2024 09:11:27 +0000 Original-Received: from localhost ([127.0.0.1]:53390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9hV9-0001K6-08 for submit@debbugs.gnu.org; Sat, 09 Nov 2024 04:11:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9hV7-0001Jt-E5 for 73978@debbugs.gnu.org; Sat, 09 Nov 2024 04:11:26 -0500 Original-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 ) id 1t9hV1-0001Rx-8y; Sat, 09 Nov 2024 04:11:19 -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=Hnk97JWhgR2FJYIU5HxxaP4hpTHbXp2vzoyUnEdmRns=; b=G4uPea2qvSpHSR0+iSQE QJhoHuoQQb7wVuyEuuwga0su0OnnNUqqZc9gecoFu03Hup+cqAFLG00puJX+1bjj8mS6rv4XzCIBa gigt4Lm2/3JYNA9DgFaM64lm2pMc67kFAk7M95FOMyxAVXjh1E74AKPbx2WPPJMKtYgICwiOik5hC Kkl7OVh5Xqz0563S8Op7I6BfFCYLhbQ1v5qkVZuHSW+dBo6kwQ/TC9GWYbgav7nVPCl/O81Mvo12r H8WmZ2/GZCsPdJ9Bc6myMLSbmeAKEjt6wODrqv13Z/icn/GF277PR7YNZ9bffEC3nttaMs7bjaBF/ 8xTlaDbPKqdQUQ==; In-Reply-To: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> (message from Yuan Fu on Wed, 23 Oct 2024 21:06:40 -0700) 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:295107 Archived-At: Ping! Theo, can you answer Yuan's questions? > Cc: theo@thornhill.no > From: Yuan Fu > Date: Wed, 23 Oct 2024 21:06:40 -0700 > > X-Debbugs-CC: theo@thornhill.no > > In tsx-ts-mode we use this query to apply syntax properties: > > > (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)))))) > > > And then in tsx-ts--syntax-propertize-captures we mark everything > enclosed by the captured jsx_element nodes in text fences. > > Then for the following code > > > > All the func() and other code will be considered text because the whole > jsx tag () are wrapped in string fences. Theo, > what’s the original intention for marking jsx_elements as text? Can we > only mark jsx_text as string? > > Yuan > > > > >