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.devel Subject: Re: New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter) Date: Tue, 13 Dec 2022 18:38:36 +0200 Message-ID: <83wn6vntrn.fsf@gnu.org> References: <1B9F9B3A-A757-4A65-9653-CD0112EB8895@gmail.com> <5BB6E79A-B1FA-40F4-B48A-DADF63A30DDC@gmail.com> 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="3286"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, monnier@iro.umontreal.ca, acm@muc.de, emacs-devel@gnu.org To: =?utf-8?Q?Jo=C3=A3o?= Paulo Labegalini de Carvalho Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 13 17:39:09 2022 Return-path: Envelope-to: ged-emacs-devel@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 1p58JB-0000h2-DG for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Dec 2022 17:39:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p58Ig-0001K9-0w; Tue, 13 Dec 2022 11:38:38 -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 1p58Ic-0001IX-S8 for emacs-devel@gnu.org; Tue, 13 Dec 2022 11:38:34 -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 1p58Ib-0003uA-6q; Tue, 13 Dec 2022 11:38:33 -0500 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=Dw+iz8xT3Fw10/Qy61nTd1hEXRFlPuT6F8U3dooNzEI=; b=iKT0nodKoxEOGZsNht23 XdWjQsRA2TUJ2wx8j2Hbva+GvE2CRkuhoew1PWRgjtKBApoYchLNoh6v4h8+O2JwGYL6vBmBAkwHH sATQiaREmPiGzNo2rUpwjCM4ysUaPFL8r2UErsOThfYghpuW/jaTtrNZbQMXgib7sUPqlfPSBN3dK ta8M7iPMCbYSYmhLrGvEUJ1+SR4IEzd0lNGpFT/GAuY35yWTp4k0xGMJ6s6PkhGRN6c/yL4b6giia 1pZ+r/Ad4KqWOQ0/g7E6JbnRYbIBwFuA+vfI3t0Onz21H7Qmv5SyCNEDENSGxaOEHGxEoBXNGyqSd a1f47AbuOshyfw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p58Ia-0006Vx-Ga; Tue, 13 Dec 2022 11:38:32 -0500 In-Reply-To: (message from =?utf-8?Q?Jo=C3=A3o?= Paulo Labegalini de Carvalho on Tue, 13 Dec 2022 09:11:41 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301328 Archived-At: > From: João Paulo Labegalini de Carvalho > Date: Tue, 13 Dec 2022 09:11:41 -0700 > Cc: Stefan Monnier , Alan Mackenzie , > emacs-devel@gnu.org > > For instance, if I am within a function I would expect to go to its beginning when pressing C-M-a, and not to the > beginning of the first leaf function when searching backward. Although the current behavior might be desirable > to some users and should be possible as well. I think the command that goes to the firs leaf backwards should be bound to C-M-u, not C-M-a. C-M-u takes a numeric argument to specify how many levels up to move, so the user can control to which leaf top go. Or maybe we should have an entirely new key binding for these fine-tuned movements.