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#73404: 30.0.50; [forward/kill/etc]-sexp commands do not behave as expected in tree-sitter modes Date: Sun, 05 Jan 2025 14:18:17 +0200 Message-ID: <86cyh18nee.fsf@gnu.org> 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> <87zflac68t.fsf@mail.linkov.net> <87jzcdlxdp.fsf@mail.linkov.net> <87o71jocgs.fsf@mail.linkov.net> <87wmfwqg7e.fsf@mail.linkov.net> <8734i5fyv1.fsf@mail.linkov.net> <875xmumpzv.fsf@mail.linkov.net> <86ikqubdsd.fsf@gnu.org> <87wmf9912l.fsf@mail.linkov.net> <87a5c5v5z8.fsf@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10141"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, mickey@masteringemacs.org, 73404@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 13:47:29 2025 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 1tUQ2T-0002Sn-8T for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 13:47:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUPay-0002XB-FH; Sun, 05 Jan 2025 07:19: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 1tUPaw-0002Wy-Ji for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 07:19: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 1tUPaw-0002R0-Ar for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 07:19:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=FGKR5h/wyOBIhstqMgjfkgptHmeX9nTVx/vTAGYUNos=; b=i6uT/4oLl8K5EVXB6euK5JABp0TzMccBLdBYzBWK6aBpQZsI25Nt5VGCThtkr7MtAor79AZPDehG7/bORmtM6Sxd6J7rumiu8p4PTjI5gX8Z2tFiSlDtRo4KxyfGwVVw3aIebHWAGCJ7WPHoDpfRIHGwCb7HF5NuCXJokX0SzewNUk9ahPIQDGKk0Cz9BZm1hsz6WykpLPMG+Nf0MfSa7CE0d1IjVSyXRCVFPEm8fuMsqF0tF3CFh2FHnDZhzarpSL30Yebi5sUjYNhwSBRzAtIRcSgemN/zuv1bhTQa1CbUnbhIn6ZZzSQC/gvpB62bYpYv9JtPHdDrc+PXVGD4tA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUPaw-0007hv-4S for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 07:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 12:19: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.173607951029562 (code B ref 73404); Sun, 05 Jan 2025 12:19:02 +0000 Original-Received: (at 73404) by debbugs.gnu.org; 5 Jan 2025 12:18:30 +0000 Original-Received: from localhost ([127.0.0.1]:60250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUPaP-0007gj-Pe for submit@debbugs.gnu.org; Sun, 05 Jan 2025 07:18:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55152) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUPaN-0007gT-Gg for 73404@debbugs.gnu.org; Sun, 05 Jan 2025 07:18:28 -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 1tUPaG-0001l4-2b; Sun, 05 Jan 2025 07:18:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FGKR5h/wyOBIhstqMgjfkgptHmeX9nTVx/vTAGYUNos=; b=TI1XVz5uQQfm tghepZ50XM5zMjalEPOfG0RFroPoAe1g//2Cpq3P1whWo0VWYNgcCcJ1HEX+Uj4BhRdXbXzMAtxLr znZkqJtfA7b1XHe1sbcPvfKEFTkt0ll60zsReeV3voKyySmzJnW4uxOaaCN1jIwOo8juaT6N+M6f8 Zt0w1A/GQyBs7ONzX5tSOVN2IniB6O572pkfeRA3bdfYsiCB1uUCnL9vJyBi6NkxM60IXAhCxt2qg pCYu8TqMXOkpMKO8vPiQsV9R7DHrG91ojVXYYDW+MDmVw9ESxDAG0oTIuIFLKHwQlF3GGFoe+PB6C uttf52RdMcQqJeQxqDSPVA==; In-Reply-To: <87a5c5v5z8.fsf@thornhill.no> (message from Theodor Thornhill on Sun, 05 Jan 2025 12:46:03 +0100) 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:298557 Archived-At: > X-Spam-Status: No, score=-1 tagged_above=-10 required=5 tests=[ALL_TRUSTED=-1] > autolearn=ham autolearn_force=no > From: Theodor Thornhill > Cc: casouri@gmail.com, mickey@masteringemacs.org, 73404@debbugs.gnu.org, > monnier@iro.umontreal.ca > Date: Sun, 05 Jan 2025 12:46:03 +0100 > > Juri Linkov writes: > > > The command is 'forward-list'. With 'list' it will do in ts-modes > > the same that 'forward-list' already does in non-ts modes. > > One issue I've had when exploring these things earlier is that I don't > know the "spec" for how navigation in programming languages should work > in Emacs. I mean, there are lots of examples in the source code, but no > true specification. Should we possibly try to define some sane defaults > here, so that it will be simpler to deal with idiosyncrasies of the tree > sitter parsers? Lisp isn't in my experience the best language to define > this, as it is just too simple. Also, many of the functions are related > to word processing, like sentence, word, paragraph etc, which aren't > really useful in programming, imo. What is a sentence in java, lisp, or > python, for example? Also, maybe sexp is too lisp/ast-like of a term, so > much so that it is hard to reason about what a sexp is or isn't. Is this goal achievable in practice,l given the sometimes radical differences between languages? Maybe we only can have examples and some dwim-ish behavior in most cases?