From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 19:20:10 +0100 Message-ID: <87y0zpt95x.fsf@thornhill.no> References: <87plox4mtp.fsf@masteringemacs.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> <86r05h6vsl.fsf@gnu.org> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14266"; 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: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 19:21:34 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 1tUVFl-0003ZZ-Pa for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 19:21:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUVFJ-000463-Tl; Sun, 05 Jan 2025 13:21:06 -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 1tUVFH-00045c-Te for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:21: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 1tUVFH-0004iz-Lj for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:21:03 -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=S3j0UJpO09yQeNNRJQMZNeUR4NYYAxwJ+3KDuU8c5v8=; b=ApvsbvGBAdvSNAV2g0aP9zds+zm/58bQhHEDBQgdVOsrenUCG3Y8Wk7B3sbqW7s9Ode6L3rsfwJjtPiCobNIl9YUeIbMyMTatmWudhhghYKfH3USyfcqBMbtTsX+iJmw/gsm+vrJKeuGmfHy0qG/4CUq+WuPWlL6EviQJcuFWtAWNwQBMei1XUrCRZAlOMM0fKnJ9ZJf6SBwUqfLmTYAlPFxCnwf6Qq6mxWALm72tS2vZzjDIHOIVTmjt3gxZevsoHAESC3/sUu8OdxBEfesQP46bsjZNsOP4xM47YzmQ4/z3HqVdQ1kfORXJHb6HqTR5dPVGT+lTBNpB9J7DzQ9Gg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUVFG-0001Jz-Gj for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 18:21: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.17361012255005 (code B ref 73404); Sun, 05 Jan 2025 18:21:02 +0000 Original-Received: (at 73404) by debbugs.gnu.org; 5 Jan 2025 18:20:25 +0000 Original-Received: from localhost ([127.0.0.1]:35142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUVEe-0001If-P0 for submit@debbugs.gnu.org; Sun, 05 Jan 2025 13:20:25 -0500 Original-Received: from mx.kolabnow.com ([212.103.80.154]:54600) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUVEc-0001Hf-KB for 73404@debbugs.gnu.org; Sun, 05 Jan 2025 13:20:24 -0500 Original-Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 73F4D3004C6C; Sun, 5 Jan 2025 19:20:16 +0100 (CET) Authentication-Results: ext-mx-out013.mykolab.com (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-type:content-type:mime-version:message-id:date:date :references:in-reply-to:subject:subject:from:from:received :received:received; s=dkim20240523; t=1736101214; x=1737915615; bh=S3j0UJpO09yQeNNRJQMZNeUR4NYYAxwJ+3KDuU8c5v8=; b=GKd7YCzQdgGu ImGMpA8dSD3KjcBJb4JjF3yncOF95vIoN6Riij73lXxnglF3GHYot4cl1Z1A/3jz uU/+5+kSTjkJ+NW3hsyWy8ICJm5x8/fK7E+sgIoD1NDbp6pS8OT2f3Lk3mw6qh72 w8kifEhXA/GGv3qOgKiGBgnZZL8/+Az6TKWEtBklQ7/nbXSjXPu9KMOCj00zrTjA uplfY9JkQ/Isz3juCnKk4D6/uFQYhi4udTAx/her/sQNHD3/WBhF0B8EgagYyLPV 4cS7SXwVvxvk7gevWVbIzwMOK88JJU1mrOu7JmmjWxhQOJLUr0XPZ2uAR+U91c8S nCXX/s+1dw== X-Virus-Scanned: amavis at mykolab.com Original-Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out013.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id mxOUFGMIITGZ; Sun, 5 Jan 2025 19:20:14 +0100 (CET) Original-Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id 06D4C3004C6B; Sun, 5 Jan 2025 19:20:11 +0100 (CET) Original-Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id BBA1B3141C4A; Sun, 5 Jan 2025 19:20:11 +0100 (CET) In-Reply-To: <86r05h6vsl.fsf@gnu.org> 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:298585 Archived-At: Eli Zaretskii writes: >> 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. > I didn't mean to sound harsh, my apoligies. > 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. > Sure! > 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. Yeah, absolutely. I think it is moving in the right direction. What I'm thinking of is more in the line of standarization as a conscious effort, not by consequence of convention. The reason being to help aid us when discussing these issues. I feel we often attribute bugs to our subjective meaning, perhaps because we are missing some clearer structure in the expected behavior. I'm absolutely open to being wrong here, though. Theo