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#66988: 30.0.50; treesit-forward-sexp not working properly in js-ts-mode and tsx-ts-mode Date: Tue, 14 Nov 2023 22:28:34 -0800 Message-ID: <1C21FE6B-D54E-4301-AB87-5F15EE06D7D1@gmail.com> References: <9cf7d7d0-33a3-4c07-bd66-bc4c59bdfefb@gmail.com> <39b0057b-ac0c-8271-0fe2-f4deef7ae8d3@gutov.dev> <83zfzkwxlv.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) 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="36654"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , 66988@debbugs.gnu.org, Theodor Thornhill , loic.lemaitre@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 15 18:08:28 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 1r3JNM-0009Ng-9r for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Nov 2023 18:08:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3JMy-0004Vt-Lj; Wed, 15 Nov 2023 12:08:04 -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 1r3JMx-0004VD-0K for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2023 12:08: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 1r3JMw-0005bb-OV for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2023 12:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r3JMv-0006EE-QH for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2023 12:08: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: Wed, 15 Nov 2023 17:08:01 +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.170006806923922 (code B ref 66988); Wed, 15 Nov 2023 17:08:01 +0000 Original-Received: (at 66988) by debbugs.gnu.org; 15 Nov 2023 17:07:49 +0000 Original-Received: from localhost ([127.0.0.1]:53460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3JMi-0006Dm-J2 for submit@debbugs.gnu.org; Wed, 15 Nov 2023 12:07:48 -0500 Original-Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]:59852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3JMg-0006DT-5z for 66988@debbugs.gnu.org; Wed, 15 Nov 2023 12:07:47 -0500 Original-Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-6711dd6595fso36493926d6.3 for <66988@debbugs.gnu.org>; Wed, 15 Nov 2023 09:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700068061; x=1700672861; 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=7qqLfiPEjK9FtR30Si6VvIn2YdOJ0ePJkJ51c5yXvCY=; b=NKrZASM17kqk7ViesamYRkgjAF8wkSjljmYV94lZ58exOtSN+7kudHsGDFKRcC0a+k KCR42mlK+UKDqwYmmRLYgFjBwOLdPRFSBXjxflbC/zi8YRl9jPG2s7JxhdMpmxJ6VA/p V4tGXY5DgN/SUyOUANdK97vN2gyI1IVVne8P0YDGu7VySo5Og60wy9nXP4P9u7KSCVpR an69Di0lSH1Rd3JOEdbHnqYtTxC/FV9pT7/45Z8m+ye85kohWJXVjcfE6sTEj8rdrwI5 2ZvHrHp5Fq01weE8YIMsWlRf5uJCLbqLBwsXxxPiOSIFZlzklqd4Tc/RwZTxHWL8LQtJ QI8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700068061; x=1700672861; 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=7qqLfiPEjK9FtR30Si6VvIn2YdOJ0ePJkJ51c5yXvCY=; b=N4DDAAkWjvIGVvB6bs8644hOux+fqogiqJtr5hQfAIZi7FRXX8xwvGD9GZ40xPyVU/ sr827wpEA+cjH80s1U0SwtJkN53B8YU/rxEU6HFmfDvrcbPkB3CtVVrMORw3D7hKnxF3 gC7rFd2GMFxSmfVwvCr7Be50zg+BYWBljYdDu6PDuJYz4U21LrfyK0mDXLDIQLrfxgso FkPOQtIYUYfLxCWVy+o1OrmngFTbgSYBvo10vLixS4I51WADTiX32DFaamRDbm8igyAL txEcW/bgvQfdJN/NdzQChWvIXC7RtFRLcp4yTYopvlwC3bAksyBV9PDs+wL0HJKxB+3V BKWA== X-Gm-Message-State: AOJu0YyKxYC22FiUo8izHUXSrSpv+xQYX1e1gxGoNCQ/Zj0gpLb3+7ca z9xaXAhR0xDJXkMHWFwUpw7g8dBI3CY= X-Google-Smtp-Source: AGHT+IERpLqeBp93tHq2pK3wFOfGkZlhGTGCvgKk4CZXJumwHeIyFUvmsvQ4oKqEbQ4ov9H8QGw3cQ== X-Received: by 2002:a05:6a00:4186:b0:6bd:a8a3:cc59 with SMTP id ca6-20020a056a00418600b006bda8a3cc59mr15755245pfb.24.1700029727449; Tue, 14 Nov 2023 22:28:47 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id x37-20020a056a000be500b006b22218cb92sm2185435pfu.43.2023.11.14.22.28.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2023 22:28:47 -0800 (PST) In-Reply-To: <83zfzkwxlv.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.700.6) 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:274391 Archived-At: > On Nov 10, 2023, at 11:35 PM, Eli Zaretskii wrote: >=20 >> Cc: Theodor Thornhill , 66988@debbugs.gnu.org, >> Lo=C3=AFc Lema=C3=AEtre >> From: Yuan Fu >> Date: Fri, 10 Nov 2023 18:41:20 -0800 >>=20 >>> Alternatively, treesit-thing-settings could be interpreted to imply = full matches, then the code using it should not only match against the = regexps but also check that the entire string (type name) is matched. >>=20 >> I regret not doing this by default for treesit-indent-rules and = traverse functions. Now it=E2=80=99s hard to change without creating = confusion and breaking backward compatibility. I wonder if there are = good way to smoothly transition to match full names by default=E2=80=A6 >>=20 >> Treesit-thing-settings can be changed to match full names, but only = if we can change treesit-indent-rules and friends too. Otherwise it = would be too confusing. >=20 > Is it feasible to have a variable that controls whether the full > matches are implied in these APIs? Then we could start by making it > optional, and at some later time make it the default. It=E2=80=99s feasible, but I don=E2=80=99t think it=E2=80=99s TRT. The = major mode author should have the control over whether the full match is = implied, not the user. It doesn=E2=80=99t make sense to toggle the = variable either. If you change that variable, major mode code must also = change to be correct. Yuan=