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: Tree-sitter integration on feature/tree-sitter Date: Mon, 20 Jun 2022 21:39:34 -0700 Message-ID: <14FD5F8F-0376-4364-9448-018F8C948D6D@gmail.com> References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> <83letvq0ii.fsf@gnu.org> <6EA831D3-A9C9-4346-B1E8-7748BAB285E2@gmail.com> <83czf7pocp.fsf@gnu.org> <83tu8io5i5.fsf@gnu.org> <83edzmnymo.fsf@gnu.org> <211D7584-1B0C-4A37-8ADF-08E1942BA719@gmail.com> <83zgi9mcu4.fsf@gnu.org> <70DEA4FC-2F93-4890-9F13-6C00D7278065@gmail.com> <83bkunmuds.fsf@gnu.org> <4E08A965-8C79-4544-8A0F-2CC2BDEBF194@gmail.com> <83letqlpjm.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) 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="12218"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 21 06:41:36 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 1o3Vho-00031X-7Y for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Jun 2022 06:41:36 +0200 Original-Received: from localhost ([::1]:52558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3Vhm-0006Rg-JN for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Jun 2022 00:41:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3VgF-0005Zi-7M for emacs-devel@gnu.org; Tue, 21 Jun 2022 00:39:59 -0400 Original-Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:44901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3Vfy-0002yu-Uy; Tue, 21 Jun 2022 00:39:57 -0400 Original-Received: by mail-pj1-x1034.google.com with SMTP id h34-20020a17090a29a500b001eb01527d9eso11301835pjd.3; Mon, 20 Jun 2022 21:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3kZP4Xuo1Gqlp+5ph2tkBT7Ljyd0MYsFhmzyBlYWkw0=; b=fxlpNdgts2uL49wZSZNjnNW1+tYN31KuPoN1wl/+7O3ogex2OY5jgV4K7zNjzndKgt 4bR7DJmuWUMVY9x6Yr27Mw/MV8TBz8q0lotEkskB44S4vsVjovLyl2IX0w7Tv6Nf+rYO YVejuTFN2F+yMVCrPqqNAgHYvoJqE7689lNoglReBHsbq1jatIcRVEuUd88mRmA5tNhu P/ADRqyOD03/PbhO+fKKhA6x6VcVImjM3lOpWJlmT07YAEWCPQBfHYTh3O1tUKANkuqc 9wjI+Ha0EpdxW9TknDpAZMqwLKAtAxGelT9BY5rWJGSI+JM9RtnR0oc5f2xmeZJV0jGs Axww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3kZP4Xuo1Gqlp+5ph2tkBT7Ljyd0MYsFhmzyBlYWkw0=; b=PxarRGRk5uH2FwQ/qTs3VTTdoQ5AzOhYharvJ7tVq3F6sfqY7bEr9U9jHAoTEemCZn m/mYQmpMJgZqHXP35f2HpNio46Q9alROedU+eCLJz491th4uaCYELWoayvy5Xrseemah Vg2XivLO+2q+AiyfhtCd+ztMXjY7NBIGlqxejyKuGe/IyoJhcOCH4Gg5UEKVLxx2GEkt 5h3CNsIVHV7gMtnlqxl3SlwrmWEcRzN+YqMP99QMahlakZu0A+AhZea27S4QIkF4jVLG BFCHlKtaJTsaecnNX4Ad62rykH/KCe21+uqkA0kM/BfjM+iT+dr3/C5SApnW5yrObVRp 8Yvw== X-Gm-Message-State: AJIora8CgQKXTUEhlgZEBJ8FPtnFWg+d13gSlBy5pfsQMbucSUfQ79k3 S6ZDQ//5oImR1xvOTbUnV8jXPE2H2NM= X-Google-Smtp-Source: AGRyM1vZ2ZBaKY/hlzHT3qSvFn6Fx7gGBWnOd2TnGh2TmZkNssQiC7N2sTFOBqiw87lYPG2sAFkudg== X-Received: by 2002:a17:90b:144:b0:1ea:f3a9:5f37 with SMTP id em4-20020a17090b014400b001eaf3a95f37mr28379078pjb.104.1655786375716; Mon, 20 Jun 2022 21:39:35 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:148c:4bd5:3b97:915d]) by smtp.gmail.com with ESMTPSA id w188-20020a6282c5000000b0051bfd13809fsm10048357pfd.119.2022.06.20.21.39.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2022 21:39:35 -0700 (PDT) In-Reply-To: <83letqlpjm.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.100.31) Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=casouri@gmail.com; helo=mail-pj1-x1034.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, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 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" Xref: news.gmane.io gmane.emacs.devel:291481 Archived-At: > On Jun 20, 2022, at 7:26 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Mon, 20 Jun 2022 13:01:32 -0700 >> Cc: emacs-devel@gnu.org >>=20 >> Major mode should set beginning-of-defun-function to = treesit-beginning-of-defun, not unlike what they already do with major = mode-specific beginning-of-defun functions. This way major mode has the = freedom to decide which treesit features it wants to leverage. >=20 > Then those tree-sitter functions should be described together with > beginning/end-of-defun, I think. Cool. >=20 >>>> Treesit-beginning/end-of-defun jumps to the beginning/end of the = current defun form, treesit-search-beginning searches for a query and = stops at the beginning/end of the node that matched the query. >>>=20 >>> So you are saying treesit-beginning/end-of-defun don't actually look >>> for beginning and end of a function, but for beginning and end of a >>> more abstract entity? Then perhaps it would be wrong to have = "defun" >>> in their names? And in that case, maybe a separate section (under >>> "Motion") is better after all, since this is no longer "List = Motion", >>> strictly speaking. >>=20 >> The second sentence describes treesit-search-beginning, not = treesit-beginning-of-defun, I think you confused the two? >=20 > Maybe so, but why did you mention treesit-search-beginning in this > context to begin with? They are another set of functions that I wonder where to put manual = entries in. I=E2=80=99ll probably put them in 35.1 Searching for = Strings, after search-forward. Yuan