From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter) Date: Thu, 15 Dec 2022 17:49:44 -0800 Message-ID: References: <1B9F9B3A-A757-4A65-9653-CD0112EB8895@gmail.com> <5BB6E79A-B1FA-40F4-B48A-DADF63A30DDC@gmail.com> <0B190C0C-24BE-490C-9C7D-1439B77EE9D5@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16420"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Alan Mackenzie , 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 Fri Dec 16 02:50:34 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 1p5zru-000473-Ff for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Dec 2022 02:50:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5zrG-00011a-5Y; Thu, 15 Dec 2022 20:49:54 -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 1p5zrC-00011N-Du for emacs-devel@gnu.org; Thu, 15 Dec 2022 20:49:50 -0500 Original-Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5zrA-000208-2p for emacs-devel@gnu.org; Thu, 15 Dec 2022 20:49:49 -0500 Original-Received: by mail-pj1-x102f.google.com with SMTP id hd14-20020a17090b458e00b0021909875bccso7372925pjb.1 for ; Thu, 15 Dec 2022 17:49:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xjwUEPW70xfGpxUgbictzMJTRYXV0ft7VjsU3aBtDNI=; b=lpgmDsr51KBqV3aPkWXUAWLI8FY5JmRp80SffCArIu5Nk6/1RyUX39d2eSUO6BKRNB k+5ZVQuGWqU5nZTMqbE0lqbraanK3IDARO6DSdcE64dR0ioBb8W9HqR3sfI8VYwVBrET nrXXdxuUS31t9bp74XDWkGdSrdwJou33az8/8A99h9xn8wqFQjSiGjJTctN48K7BUW5s ukG6jaHDZkHLcX0EQn6wmgnfE3SczF8j8NfzRAToNWoMT6LT0yUmu/vDWNfAH1O5SA4V voAnEKwodlGOdvH1OmC7+8ml9EXmI6bQYeP8kqo8yZJthGberOkVbw01mj5VS34W/QVY MEVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xjwUEPW70xfGpxUgbictzMJTRYXV0ft7VjsU3aBtDNI=; b=WRzDMr2UDNfE08UyPXYn4i4PQoMPM02GEGWU4HF+5nEzO/zKlHpoVE6VfaiVy7HHjo aNxCDWkN/Rxb+ikuA5r0bPAIdH3WxsvIiKjBgBXVx/RRn7GiyLiwLwTCzfqL03i+Q1dk i+zSeR4qtjHprRRjiGy8+3sUrRwmYR2SgCOiiZnS/SnciAcMbWXhjuIuMzayVvHPigwA uOt0sDvjH+5Ta1xabftJuA+Un5EUpBUb/4+IvrP6k0mbaD5bUWXWL46pOVHiFlKwAZLk rqaKeakpkhLwDAwHK8XbqKz9iW5IaMcxT4W199o5EkCaY/Xpo2CVZXMTRP+1reYeDVCJ fopg== X-Gm-Message-State: ANoB5plsEqbVDZMXALOgPx8dvQKF1BYmBSP4gyAz6ccWhPlizFl6BuEt FitCABXMt7cNoIPrTXAUzP6XKP4/6L+9IQ== X-Google-Smtp-Source: AA0mqf6m1rckAnha8encN6PKMoe/rqE+xUuqi3pwZ0PhLqxt4TDmz2EA4qgn2FROM+n6SN/TKDCWSQ== X-Received: by 2002:a17:90b:3111:b0:219:9ff8:3d20 with SMTP id gc17-20020a17090b311100b002199ff83d20mr30933328pjb.35.1671155386615; Thu, 15 Dec 2022 17:49:46 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id fr1-20020a17090ae2c100b00218fb3bec27sm252792pjb.56.2022.12.15.17.49.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2022 17:49:46 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=casouri@gmail.com; helo=mail-pj1-x102f.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, 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:301475 Archived-At: > On Dec 13, 2022, at 11:46 AM, Jo=C3=A3o Paulo Labegalini de Carvalho = wrote: >=20 >=20 >=20 > On Tue, Dec 13, 2022 at 11:56 AM Yuan Fu wrote: > I will repurpose two functions, treesit-beginning-of-defun/end, and = make treesit-major-mode-setup set them up automatically. I=E2=80=99m = thinking about remapping beginning/end-of-defun to their tree-sitter = counterparts in (current-local-map), in treesit-major-mode-setup. That = way major modes don=E2=80=99t need to explicitly bind tree-sitter = functions in their keymaps.=20 >=20 > That would be great. A very clean solution IMO.=20 No one seem to object, so I made the change on emacs-29. Now tree-sitter = major modes should all use the new navigation commands. Yuan=