From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Lo=C3=AFc_?= =?UTF-8?Q?Lema=C3=AEtre?= Newsgroups: gmane.emacs.bugs Subject: bug#66988: 30.0.50; treesit-forward-sexp not working properly in js-ts-mode and tsx-ts-mode Date: Sun, 12 Nov 2023 13:10:14 +0100 Message-ID: References: <9cf7d7d0-33a3-4c07-bd66-bc4c59bdfefb@gmail.com> <39b0057b-ac0c-8271-0fe2-f4deef7ae8d3@gutov.dev> <102c3f66-4d74-49b9-a099-0c54e5d1c635@gmail.com> 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="24803"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Dmitry Gutov , 66988@debbugs.gnu.org, Yuan Fu , Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 12 13:11:45 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 1r29JZ-0006M4-QC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Nov 2023 13:11:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r29JG-0004DG-BH; Sun, 12 Nov 2023 07:11:26 -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 1r29JC-0004Cp-VA for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 07:11:23 -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 1r29JC-00077k-Mn for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 07:11:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r29Jr-0000va-Hq for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 07:12:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Lo=C3=AFc_?= =?UTF-8?Q?Lema=C3=AEtre?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Nov 2023 12:12:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66988 X-GNU-PR-Package: emacs Original-Received: via spool by 66988-submit@debbugs.gnu.org id=B66988.16997910663451 (code B ref 66988); Sun, 12 Nov 2023 12:12:03 +0000 Original-Received: (at 66988) by debbugs.gnu.org; 12 Nov 2023 12:11:06 +0000 Original-Received: from localhost ([127.0.0.1]:55183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r29Iw-0000tb-1w for submit@debbugs.gnu.org; Sun, 12 Nov 2023 07:11:06 -0500 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:60553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r29It-0000t5-H0 for 66988@debbugs.gnu.org; Sun, 12 Nov 2023 07:11:04 -0500 Original-Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-32db188e254so2121474f8f.0 for <66988@debbugs.gnu.org>; Sun, 12 Nov 2023 04:10:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699791016; x=1700395816; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=F1JltHOS9GIKUza5gD/nAii8qvfSjuIEdwhairDrgvI=; b=HxOHHBxHX/5sv/4BFgW3NJRqk0qWVxO2HE9blacrOPygUMPlRc05YurSaH9fbzIhm1 DOgpldZt9kKjtc12EDatXkrEXoMaBTx9arESQyd7797KSKjuJX9tcruFfNnxtEij1vgX /dgOgWAluRe3zyKTrQMFhL9R8XXznRPgdiwmRa0GW+OoXDKkASBU0RZ4qz3JzMNOfU1U cthTiOmMNS3Eu8ZB70jxm6IYLRkeT6+JcIeivImNDTZX4rpmyYTjEmjWjQr94BDFmgG2 sio7ZgNk+TH7MT+Dow1hvZWkSC3ubkQLliPuhD/2aFdsIY5PgJITzaXNL6eUvVSP0CzD Ubjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699791016; x=1700395816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F1JltHOS9GIKUza5gD/nAii8qvfSjuIEdwhairDrgvI=; b=tKDmlfVQiCw1UeW7tBdI75BZ3I+3mCPK/kzsSaNriiMjblgK9ItENlgSwmzYKGYixT HEalxchE2nI6arTT9InnvgXRAJAN3zn0Re1mvHkFdGKh8M93dJUKEzV+zPoxxoz+DyHS JlK1UKJElHEwXYiEX4hi9VrPm2EpKWN30fiJPaxrWriYmjLXRhn1MGUrSGdd0eVhxp2e w9vK/XDlmKwO07bcvDQP3L3MwEFRtjVonCgV4zcCRWaBZ5BY89SXttmAiMXuf4VWvmO2 8pr/tadieFSEx9CwfDVid7OLGL8JBt0FAOf279WJF3kG8GqDT2cW6MbdnDTFkRfCYLRd bjtQ== X-Gm-Message-State: AOJu0YzYwxBzsJNm6UfMQqNdJ9k3POdOViogmMMRxACaVCrE7jtvhupS MTVSKnp2xrf8Qr/9tJBjkpY= X-Google-Smtp-Source: AGHT+IGv8i/xqTITN2EkNA4TBsN2aV7LBstSwdtOVsB86w7AWm+W2YWo60zHS5lJUMEkDQ3vQVzvYQ== X-Received: by 2002:a05:6000:18ad:b0:331:325d:6309 with SMTP id b13-20020a05600018ad00b00331325d6309mr3684455wri.69.1699791016306; Sun, 12 Nov 2023 04:10:16 -0800 (PST) Original-Received: from ?IPV6:2a02:8428:2fa4:4b01:ef35:71a1:d98d:592e? ([2a02:8428:2fa4:4b01:ef35:71a1:d98d:592e]) by smtp.gmail.com with ESMTPSA id d13-20020a056000114d00b003140f47224csm3220946wrx.15.2023.11.12.04.10.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Nov 2023 04:10:15 -0800 (PST) Content-Language: fr 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:274198 Archived-At: Sorry for my example that is actually not valid JSX... Yours demontrates better the remaining issue. Thanks Loïc Le 12/11/2023 à 00:40, Dmitry Gutov a écrit : > On 11/11/2023 17:43, Loïc Lemaître wrote: >> Thanks for the patch ! It fixes the bug. >> But unfortunatly, there is another similar bug in >> /treesit-forward-sexp/, that you can reproduce with that example: >> ({()}); > > The problem in this case is that the code doesn't parse (one of the > nodes in the parse tree is ERROR). Removing either the curlies, or the > outer parens pair makes the code valid and the behavior > correspondingly better. > > Although for treesit-forward-sexp to jump between curlies in > >   {()}; > > we'll also need to add "statement_block" to js--treesit-sexp-nodes.