From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#65470: 29.1.50; js-ts-mode: regex pattern can cause incorrect parenthesis matching Date: Fri, 15 Sep 2023 16:35:55 +0300 Message-ID: <6638462f-89fe-97c4-f008-27e1e2415d2b@gutov.dev> References: <127B5BEA-A24B-48A3-9827-85B7CDB67D10@secure.kjonigsen.net> <5f823f8f-d249-f4a1-71e6-083e47d0d123@gutov.dev> <83jztbeeh2.fsf@gnu.org> <03415a27-f082-b204-cece-19a9859e178d@gutov.dev> <8334zze5l4.fsf@gnu.org> <1363c54f-5109-f000-3333-78d291b2096d@gutov.dev> <2D516F0C-D7A8-49D2-8009-F911EFC55C78@secure.kjonigsen.net> <2f525ebe-74e5-dcbe-4403-5e9ae001795c@gutov.dev> <5e57b91b-2967-d82d-eca5-65dc206887cf@gutov.dev> <16E4F60E-5216-457F-A79F-F8FBB5A01D61@secure.kjonigsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13119"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Yuan Fu , 65470@debbugs.gnu.org, Theodor Thornhill , btuin@mailo.com, Eli Zaretskii , Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= To: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 15 15:37:21 2023 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 1qh90a-00037z-4B for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Sep 2023 15:37:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qh90E-0007Np-8z; Fri, 15 Sep 2023 09:36:58 -0400 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 1qh90C-0007NI-53 for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 09:36:56 -0400 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 1qh90B-0000iq-Q8 for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 09:36:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qh90I-00005e-5b for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 09:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Sep 2023 13:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65470 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65470-submit@debbugs.gnu.org id=B65470.169478497732753 (code B ref 65470); Fri, 15 Sep 2023 13:37:02 +0000 Original-Received: (at 65470) by debbugs.gnu.org; 15 Sep 2023 13:36:17 +0000 Original-Received: from localhost ([127.0.0.1]:42441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qh8zY-0008WC-K9 for submit@debbugs.gnu.org; Fri, 15 Sep 2023 09:36:16 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:38203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qh8zT-0008Vt-Of for 65470@debbugs.gnu.org; Fri, 15 Sep 2023 09:36:15 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2B4A65C00DB; Fri, 15 Sep 2023 09:36:00 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 15 Sep 2023 09:36:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694784960; x=1694871360; bh=qRASEDU+7czjkuGIHtwNQjAq6TypVpZapQ1 cgB6xCjA=; b=mfIkYg8DekbUV9uEVP+a3GSx/Lr614RX0OfU2BSmorHH9M0YDZW xcMI3+1uc1Y0IivJTtih87w1hw0MDTYlAFrLkn4WApopEcsrWd9IA0RuZht0sWRI zyoNes1pjsQgf8eiT/1kFHOE4KGsO4th7KX8+DG9V3PewoTXdlfzbCzTwWdQEugs eTa06Ncvm2TYp526lCB4CZ9CesP2nPtJm3ucxBiHx1ZxP+tgksYznwOkivMWFDoE fXkY90KGM1zmqKidYSPHMPb63qPB7wZLAEM1nHG5//xQ9+z7iZiGuwwt/g4lT/ri LRhKK6C4oGU2BofwSoHQk4ysDT9WllfmPlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1694784960; x=1694871360; bh=qRASEDU+7czjkuGIHtwNQjAq6TypVpZapQ1 cgB6xCjA=; b=F+xRHhGHY11pP+GEi+4JK/2/F4cCAU+DnTL5A5R8wYwWTNQPU4A cgBZ5yCcAkGgTHwWq0xAIYlsFm6MdSn1a8JFeiJOBdvyVOlt1chdD9c032QrBSUI i72V6WdJTYx3OchMb1LpilheFyFJN7ucv3q2j3uJ9XRIAgLQS+2eXo8jR3R3FQb3 3wEM2aPw+VaQ/dpa8vvCsEBcomnGpFtOeW5t7v0PrxSq6LElUOmCcfgEoxCBwIQg 6S6NPh7rh00P7aYiSyJOroQHKQ29L6Aw6TZyDBFjwyGKRR03MAe7UO+wh2ZdhQUR DYmwdr3owi3DMT2JlL16EbgJ2LhZaIG4ybA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejvddgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Sep 2023 09:35:57 -0400 (EDT) Content-Language: en-US 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:270540 Archived-At: On 15/09/2023 15:11, Jostein Kjønigsen wrote: >> This patch seems to fix that and bring JSX syntax highlighting back: >> >> diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el >> index 57382c9cb31..7108ff49b28 100644 >> --- a/lisp/progmodes/typescript-ts-mode.el >> +++ b/lisp/progmodes/typescript-ts-mode.el >> @@ -163,7 +163,7 @@ tsx-ts-mode--font-lock-compatibility-bb1f97b >> ;; but then raises an error if the wrong node type is used. So it is >> ;; important to check with the new node type (member_expression) >> (condition-case nil >> - (progn (treesit-query-capture language '((member_expression) @capture)) >> + (progn (treesit-query-capture language '(jsx_opening_element (member_expression) @capture)) >> '((jsx_opening_element >> [(member_expression (identifier)) (identifier)] >> @typescript-ts-jsx-tag-face) >> > I really don’t know this part of the code very well. If you’ve identified an issue/bug for a specific TSX use-case, and found a fix for it, I have no objections to it being applied. No problem, pushed that to emacs-29, thanks. Just wanted to notify in advance in case somebody had an opinion on this change.