From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= 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 11:03:48 -0700 Message-ID: References: <1B9F9B3A-A757-4A65-9653-CD0112EB8895@gmail.com> <5BB6E79A-B1FA-40F4-B48A-DADF63A30DDC@gmail.com> <83wn6vntrn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c78c1505efb971ee" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7223"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, monnier@iro.umontreal.ca, acm@muc.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 13 19:05:30 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 1p59ej-0001dd-CK for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Dec 2022 19:05:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p59dN-0007GX-TQ; Tue, 13 Dec 2022 13:04:05 -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 1p59dM-0007FL-HF for emacs-devel@gnu.org; Tue, 13 Dec 2022 13:04:04 -0500 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p59dK-000168-Rk; Tue, 13 Dec 2022 13:04:04 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id f7so18911892edc.6; Tue, 13 Dec 2022 10:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XQKBcL63w2lIGWItVSNVhksMofSdb4BLgfqWBUvG4yk=; b=Erk7KvWAAaBsJVoz4JqmS3broqZVTHyDe/MlS8hLuyG1VrfXxYtqyX9enyWJVh5Dr8 e+E+YEAla5NGiY8oKfmpGsR2CrGwCFCDAR4qy0OpATGOCTSrD3l66yuKEdlDOtargIDC xM2VqEyNDouLR59T1ODG+DlWxVzZiVQ9TFrbaqrq23M/tk6EEiPlHq6GxO/jjyxKoTYp q2gCpgEod5wL61Yp8UQG61VT2EXI9WQzcGC5nKSTogY8wyxj+f6Aya8C0N+0NTEIatUE 5Y06PgsxfLrBQ9qDxhLkEzT/L/g1QammIjeUXIeiRHmusH1l58aNZkAyyBbSsC+pR/mD xAbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XQKBcL63w2lIGWItVSNVhksMofSdb4BLgfqWBUvG4yk=; b=bz1OAbIzf8bs488nSJTz/qlJo2hQNcNqBGYNQtNF92I3a0/VBC8wwSu3LCcpayppad LTSKGxr+dYAMrQAHjXy6AReGMxA8FK/sGfhu7UIzoUygmNFG7+dsjEWB+tzZv0bmWEJd lQtGFgw0DBxQ3+8ZsjN7IICBqCoUyWuTtIFfkvfRIKEB5LxX3xBWVgB3XE/VhkaYsG4G xHiLEAtpuMBbi6nJUQ1ymI6uzPLGs2fdokrQ2GgKy1XuecR0Lh2FdAk9u6h+rIPPhoBy Y//fwFYOYR7Z4mGNaxWNjYq4i+k9yI5c/dF4u+9gVUSd6cuxOlWWDNlu3UJTfQwJQDEW kGWw== X-Gm-Message-State: ANoB5plGD6wpct9xHaxPSt16frRGc1uxV3wkPhHek7ycSu4D0VrvUMg8 5Jb2eLLEiSoo9MqXN6gIPVLTOhKu6nXOHD84BDTD3aGh X-Google-Smtp-Source: AA0mqf4Uaa+qCKxh40E8vhhIt2kYYWS2TPdzSTkKGCpy7q9DQxksbQIcWV0GlkYKn4Y3sMQITfRpgscrlrXHgygh1mg= X-Received: by 2002:a05:6402:899:b0:46a:c6d3:eeb1 with SMTP id e25-20020a056402089900b0046ac6d3eeb1mr54990727edy.141.1670954640443; Tue, 13 Dec 2022 10:04:00 -0800 (PST) In-Reply-To: <83wn6vntrn.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=jaopaulolc@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:301336 Archived-At: --000000000000c78c1505efb971ee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 13, 2022 at 9:38 AM Eli Zaretskii wrote: > I think the command that goes to the firs leaf backwards should be > bound to C-M-u, not C-M-a. I think C-M-u is doing what I would expect, although it is currently moving point to "{" instead of the beginning of the function definition (in . But I like the idea of using C-M-u/C-M-d to move outwards and inwards. And maybe we can use C-M-a/C-M-e for horizontal tree movements across sibling functions, or upwards when the current level does not have sibling functions. > Or maybe we should have an entirely new key binding for these > fine-tuned movements. > That might be needed as C-M-u/C-M-d moves across a class of "list-defining" characters (e.g. "{" , "(", and "["). --=20 Jo=C3=A3o Paulo L. de Carvalho Ph.D Computer Science | IC-UNICAMP | Campinas , SP - Brazil Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canad= a joao.carvalho@ic.unicamp.br joao.carvalho@ualberta.ca --000000000000c78c1505efb971ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Dec 13, 2022 at 9:38 AM Eli Z= aretskii <eliz@gnu.org> wrote:
I think the comman= d that goes to the firs leaf backwards should be
bound to C-M-u, not C-M-a.

I think C-M-u is doing wha= t I would expect, although it is currently moving point to "{" in= stead of the beginning=C2=A0of the function definition (in .

But I l= ike the idea of using C-M-u/C-M-d to move outwards and inwards. And maybe w= e can use C-M-a/C-M-e for horizontal tree movements across sibling function= s, or upwards when the current level does not have sibling functions.
= =C2=A0
Or maybe we s= hould have an entirely new key binding for these
fine-tuned movements.

That might be needed as C-M-u/C-M-d moves across a c= lass of "list-defining" characters (e.g. "{" , "(&= quot;, and "[").


--
Jo=C3=A3o Paulo L. de Carvalho
Ph.D Computer Science | =C2=A0IC= -UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | Univers= ity of Alberta | Edmonton, AB - Canada
<= /div> --000000000000c78c1505efb971ee--