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: Thu, 26 Sep 2024 13:53:54 +0300 Message-ID: <8634lmbs8t.fsf@gnu.org> References: <87plox4mtp.fsf@masteringemacs.org> <87frpm20t7.fsf@masteringemacs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 73404@debbugs.gnu.org To: Mickey Petersen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 26 12:54:49 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 1stm93-0001jd-A7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Sep 2024 12:54:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stm8r-0008FL-F7; Thu, 26 Sep 2024 06:54:37 -0400 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 1stm8p-0008EZ-La for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 06:54:35 -0400 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 1stm8p-0006Qj-B2 for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 06:54:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=YbzFjl4B6d8m0e7Tz7S13UhgPn3JtsZGBh1JD8WKs9A=; b=Gav84INLYLE66955CNHbtRpIVljd1XjokraaXopYpWcurIIHrDYGyP6/BDENMaraUEpwSVQMznH1WGQkAH0/4P09VO9SmW8l7eh2MrLjIM5wsorOqYvqH9V/u7gkHGRaXDcMccHttsIPVQgW403DrvQET//+xfZ1LGXqoq+X8a9nRWWH3Cmry0G/YQyf5HCyS8JuOsI8Gc7yyDkX488HJuv8KQKGLkjZ3Twq4GecXAIPO2+KAmucE1tvOIY729tfnnCdyUqo9Q9Y4IESIAdZhWEyAp2OXeca7VcXh/VI/in+sNgn4QfMvjC8eRu1BaO8ZUTXBPBbF4KptC63+re9KA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1stm9G-0005tP-B5 for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 06:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Sep 2024 10:55: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.172734810122639 (code B ref 73404); Thu, 26 Sep 2024 10:55:02 +0000 Original-Received: (at 73404) by debbugs.gnu.org; 26 Sep 2024 10:55:01 +0000 Original-Received: from localhost ([127.0.0.1]:56016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stm9F-0005t5-0U for submit@debbugs.gnu.org; Thu, 26 Sep 2024 06:55:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stm9D-0005sr-CW for 73404@debbugs.gnu.org; Thu, 26 Sep 2024 06:55:00 -0400 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 1stm8b-0006N0-M6; Thu, 26 Sep 2024 06:54:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=YbzFjl4B6d8m0e7Tz7S13UhgPn3JtsZGBh1JD8WKs9A=; b=nnea3bZnVBNtLGRlcJ3b HzKjIEpe1LuWKPS+2hepRn6Jsez9O69o037yuDipcDzuvBxA+lsdieKeDR8v1Kfzay5EWeNcuzEsJ e5sKRtzKjNFN3r7FGJ7Ysg2oJapOe/9m9hwq2H79WiE2zkxRDX+I1fUF3xjzj4mUD2QRVCeMsAy48 8X4bIVx72ba4E914JckZwSMUhHkUF8giP6S7iEW5X6nikAkmCN96F4nmj3mulM5XYWLYUOqi0ZqS3 Dr1oi1P0IknhEEkGFjib2O24eSLd6G9JrMIivsngxJiftbs765F8WdS/rybrAnzNPP0baHOvCA+Cl FYV/lp7tVIfr2Q==; In-Reply-To: <87frpm20t7.fsf@masteringemacs.org> (message from Mickey Petersen on Thu, 26 Sep 2024 10:56:35 +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:292452 Archived-At: > Cc: 73404@debbugs.gnu.org > From: Mickey Petersen > Date: Thu, 26 Sep 2024 10:56:35 +0100 > > In my opinion, that's not what `sexp' movement is. > > Sexp movement is movement by balanced expressions -- and a fallback to > word-like behaviour absent that -- and this is not that. It would be > better to relegate this sort of thing to its own set of keybindings. The term "balanced expression" is not well defined in languages other than Lisp and Lisp-like ones. It is clear what expected when point is on a brace or a parenthesis, but entirely NOT clear when you start from something else. For example: int foo = bar + 2 * baz; Suppose you start with point at "foo": what would you expect forward-sexp to do? nothing? > > We might need to add a user option so people can easily turn off > > tree-sitter sexp movement, since it isn’t a strict upgrade from the > > generic sexp movement—it’s more of a different flavored sexp movement. > > It should be opt-in, not opt-out. I disagree. Moving by sub-trees is a natural generalization of sexp movement for languages where parentheses and braces are rare and far in-between.