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 18:59:54 +0200 Message-ID: <86r05h6vsl.fsf@gnu.org> References: <87plox4mtp.fsf@masteringemacs.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> <86cyh18nee.fsf@gnu.org> <874j2dv3x4.fsf@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16586"; 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 18:02:08 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 1tUU0t-0004B6-DK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 18:02:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUTzz-0007os-Us; Sun, 05 Jan 2025 12:01:12 -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 1tUTzr-0007iX-Ca for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 12:01:06 -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 1tUTzq-0001q7-QQ for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 12:01:03 -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=ZPhB7GIUGfp5iLilvMcU6zffK2sZ4AscRzs0u3bqoPc=; b=q22gvq0UxQh0j/3vKkhwPTM+dyLx3a1mcul09Gp4v0e87aPYCYFxVj8carxW1BzLxh087VFQAWL/kjSQLmguU02mQ8uR7Fl6nwTbeyFtJ8v0FKsLKx69K97Z+qVZnpbrFgt35Fjm+Im23Y2lEkOPon4ZqFtsQyXxqTUepa/hBytk6glc+glS9IGijkXZZtwDrau2F/6DNxxF/aGt0Lw+f1FMhYaCLVymG88cJLCJqyHO8XRCQ35lMBOEtCSyIuuiaQ4W/Rowcib87ly9LX8E9YaW7BWelsvim4u8IXLxa9/9u5wXHiPygw934fgNWAdxcRpT7Zk2PI9LmF06CIsbeg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUTzq-0005h5-CD for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 12:01: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 17:01: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.173609640921378 (code B ref 73404); Sun, 05 Jan 2025 17:01:02 +0000 Original-Received: (at 73404) by debbugs.gnu.org; 5 Jan 2025 17:00:09 +0000 Original-Received: from localhost ([127.0.0.1]:34973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUTyz-0005Yk-0I for submit@debbugs.gnu.org; Sun, 05 Jan 2025 12:00:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33634) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUTyu-0005XT-9E for 73404@debbugs.gnu.org; Sun, 05 Jan 2025 12:00:07 -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 1tUTym-0001VE-LZ; Sun, 05 Jan 2025 11:59:56 -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=ZPhB7GIUGfp5iLilvMcU6zffK2sZ4AscRzs0u3bqoPc=; b=JeQTNPH2MfGA H9twVuu9Ya2j48/CaTv26NmVX7Zm/hR64eVw6V3qxSFXe1iXXR+OGwTUAWUOKaPb3m3v4w/dn5BVn rDpi4TFwaLOyiphKvL9qo4UsB/djXHKssiSUzR07sR0THeHtpWY7O5qgO0N+qe84CrS7/5biL4LNC lpgESQHm3q0HFJLrb6xNrG61XX1yd0A/wp4gTuc9d+CAI0isj/aVt3Vjg7HAAcfwZlV1kH4tZTG8D 3lhG4Yo37LfRNAl5Z0W31AvdaRbe/5uwjGV9OLdNBqvWUrkqMTa/T86JagyVU8GVaMhlhEmuzRKUn 7GaeSr55FthzP6aY7i6VlQ==; In-Reply-To: <874j2dv3x4.fsf@thornhill.no> (message from Theodor Thornhill on Sun, 05 Jan 2025 13:30:31 +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:298575 Archived-At: > From: Theodor Thornhill > Cc: juri@linkov.net, casouri@gmail.com, mickey@masteringemacs.org, > 73404@debbugs.gnu.org, monnier@iro.umontreal.ca > Date: Sun, 05 Jan 2025 13:30:31 +0100 > > > Is this goal achievable in practice, given the sometimes radical > > differences between languages? Maybe we only can have examples and > > some dwim-ish behavior in most cases? > > I'm not sure if it is achievable or not, but I think it'd be nice to > avoid any "hand-waviness" to confuse us while we talk about > sexps/lists/etc. I could try to document thoroughly how lisp-modes and > cc modes implement these and see if we have some glaring discrepancies > between just those two? They are not "discrepancies", and certainly not "glaring", but there are differences. E.g., in c-ts-mode, we support "lists" enclosed in (..), {..}, and <..> (but not [..], for some reason). You will not find anything like that in Lisp-like languages. So, if we want to have a broader picture, we will need to try more modes. Can you or someone produce an exhaustive list of all TS modes we have that implement these movement commands? Then we could try the commands in each one of those modes and see if there are common patterns that we can name and describe. For now, my conclusion was that (almost) every parenthetical grouping supported by the language grammar can be moved across with these commands. But I only tried Lisp and c-ts-mode.