From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#73404: 30.0.50; [forward/kill/etc]-sexp commands do not behave as expected in tree-sitter modes Date: Thu, 05 Dec 2024 20:52:18 +0200 Organization: LINKOV.NET Message-ID: <87zflac68t.fsf@mail.linkov.net> References: <87plox4mtp.fsf@masteringemacs.org> <87frpm20t7.fsf@masteringemacs.org> <8634lmbs8t.fsf@gnu.org> <87bk0a1u0o.fsf@masteringemacs.org> <86tte2a5o3.fsf@gnu.org> <877cay1lqt.fsf@masteringemacs.org> <86frpma06f.fsf@gnu.org> <86ikueiekp.fsf@mail.linkov.net> <86ed4zg1cc.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32912"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , Mickey Petersen , 73404@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 05 19:54:16 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 1tJGzP-0008RI-SN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Dec 2024 19:54:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJGzE-0004Cq-T1; Thu, 05 Dec 2024 13:54:05 -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 1tJGzC-00049p-QA for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 13:54:02 -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 1tJGzC-0001FC-I3 for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 13:54: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:Date:References:In-Reply-To:From:To:Subject; bh=rk5Q1ezZzG6Ptf+M5uXe2ikYSHOeIfbPoqhJpu7zWGk=; b=NmBZRkRqKJCbeKyPxVkPgM0ZcBoqvIVP2zJj3Rox+0HZJXa4IrlRRNZerIzFfZJ7bNMB9Kvo/dRmQPo9+Nhw7xQBkMjY9tq509OPaWsWTO3GLdXefdbNCcvCagn+5jEDvs3hInaWqNLXVE42UWOcUaKPN7/Bc8PN0Ll+Rlvls4dIQ85OWK2hr/QvKVM9O1Gc/gzWA55MThAXawsa9T3Css09EPgMrYVGJqYOqKoddT4tfC4TPWWnDUTav4FoyI9iyEYylkDUueP1rh8VXGS4WTpCqoDhHOryGaHUguMihlXZ49OnesRyRVAvYBfC6oIWE3d6c9A7Ef0tc+K2cJhYEQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJGzC-00057Z-Dl for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 13:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Dec 2024 18:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73404 X-GNU-PR-Package: emacs Original-Received: via spool by 73404-submit@debbugs.gnu.org id=B73404.173342483719674 (code B ref 73404); Thu, 05 Dec 2024 18:54:02 +0000 Original-Received: (at 73404) by debbugs.gnu.org; 5 Dec 2024 18:53:57 +0000 Original-Received: from localhost ([127.0.0.1]:40923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJGz6-00057G-TF for submit@debbugs.gnu.org; Thu, 05 Dec 2024 13:53:57 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:44091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJGz4-00056y-La for 73404@debbugs.gnu.org; Thu, 05 Dec 2024 13:53:55 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id CB1FD1BF204; Thu, 5 Dec 2024 18:53:27 +0000 (UTC) In-Reply-To: <86ed4zg1cc.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 01 Oct 2024 20:49:39 +0300") X-GND-Sasl: juri@linkov.net 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:296481 Archived-At: > The new logic is the following: if there is no sexp thing defined at point, > then fall back to 'forward-sexp-default-function'. > > Then after (setq js--treesit-sexp-nodes '("binary_expression")) > 'C-M-f' in e.g. > > export const add = (a, b) => -!-a + b; > > moves point to > > export const add = (a, b) => a + b-!-; Unfortunately, I still can't find a way to handle such case that from export const add = (a, b) -!- => a + b; typing 'C-M-f' should jump to the end of the next sexp (to the end of whole "binary_expression"): export const add = (a, b) => a + b-!-; since only tree-sitter knows about "binary_expression", so 'forward-sexp-default-function' can't be used here.