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: Fri, 17 Jun 2022 00:32:34 -0700 Message-ID: <38C272F6-828C-4478-9D90-326AF14D0C94@gmail.com> References: <5bada349-2f43-4325-b696-70918584cd3d@email.android.com> <83mtfsuluo.fsf@gnu.org> <87sfpjhm33.fsf@thornhill.no> <83a6brufe5.fsf@gnu.org> <87pmkmhp8i.fsf@thornhill.no> <83v8ueuc7i.fsf@gnu.org> <73DE25BA-5EEF-4497-8F98-8C5F20853A61@gmail.com> <87v8uewfuq.fsf@thornhill.no> <87mtfkbt9n.fsf@thornhill.no> <1179E1EC-90EF-4989-BE1D-115498F77F60@gmail.com> <87k0ajygry.fsf@thornhill.no> <6EF70929-5759-4F1A-B878-0C1660FB6831@gmail.com> <87leuy5z46.fsf@thornhill.no> <2E68780C-9923-411E-A5DF-B1A54E2EC38B@gmail.com> <83k09fq0am.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="12236"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Theodor Thornhill , monnier@iro.umontreal.ca, emacs-devel@gnu.org, dancol@dancol.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 09:34:28 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 1o26Uu-0002tE-6F for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 09:34:28 +0200 Original-Received: from localhost ([::1]:42858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o26Ut-0001mH-2t for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 03:34:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o26T9-00011t-QG for emacs-devel@gnu.org; Fri, 17 Jun 2022 03:32:39 -0400 Original-Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:46623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o26T8-0006HI-5R; Fri, 17 Jun 2022 03:32:39 -0400 Original-Received: by mail-pj1-x1031.google.com with SMTP id k5-20020a17090a404500b001e8875e6242so3451420pjg.5; Fri, 17 Jun 2022 00:32:37 -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=kH3qi7ard+E0bm3DGXmnrnz95n1i+5t/ShhYp22QDEs=; b=IqReqcMb50ESYKfTjcovZFW14BHOzxpyXdsivAlw8IMcZ7RKAERNcBI9589EK9MoUQ jbzn7lEnRQyIthp/VUU6wXGIOo+sXEpAAQtexEZqVa9+Sme3nu+tZAB6Go9LkIvRwKyg wgfVI7wNJBtdlzK52XZPBUJcFbk+KwY6R2pTxnQHdnQQJ4MMgQYrtyxrMIgOn0u88mgK eMAoIEU0hJ0UxC0YMtR1Tp/dSnJ4YMYCoPfgeXa6zepwJE+YiN2DgtWuVXihOPsr2qWL NNKMTBFG8ex/IRNOqEFB/mcfnkWiPwCwQRQrPGlJnwKwflG1G8TaSDBAwAn+v+0SYalh q7rQ== 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=kH3qi7ard+E0bm3DGXmnrnz95n1i+5t/ShhYp22QDEs=; b=yU/xrU13yNXOUMGxo/qI4+egJ3QR6W3HksNYl//btfhfGb/itNYczMSMkcYUZCPFUj jBLqSBuJOJL91V9YtD7KcfRHqSp6/MEpROln7O02VuHagzhi7qhj0nvliWaIM/8LLRmm NoscZc3gqFBX7/y8pJwYf2q72vPCZDTH1t9v1f3+ZlvLjkiEpLGFKULu8TPcKxEllvj8 0j9TTBpXOU2LT8+c4Sa/6jzLdV2jzMxUOOju0mEsJm2cp7+wT6AEFbRfIuCpBXcF51CZ sWZ5tioexoh5EdaenVfuMJD0WRx7wh0ESV0jXzajgZfUvgeHJMFkn2skG6jDMfjp6V6/ /qCg== X-Gm-Message-State: AJIora/Gch38F+WyEZiJLuKjzfqlJrbQJxRf/mwdf/M6VmG9uU/8KgsT LeSKvmhJIUQxBb8tid9CuQgM146PXZ8= X-Google-Smtp-Source: AGRyM1uQjKoVLEkXnTK1kHHfsBp5xohfs0TutNzgmrrg0UjEw+WXBMAtT5b0QAP/uAPdskVhBDrEOA== X-Received: by 2002:a17:902:aa43:b0:168:ef35:5bd9 with SMTP id c3-20020a170902aa4300b00168ef355bd9mr8057398plr.137.1655451156101; Fri, 17 Jun 2022 00:32:36 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:c15:33ec:172b:f758]) by smtp.gmail.com with ESMTPSA id m25-20020a62a219000000b00522c8fb04adsm3080729pff.176.2022.06.17.00.32.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2022 00:32:35 -0700 (PDT) In-Reply-To: <83k09fq0am.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.100.31) Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=casouri@gmail.com; helo=mail-pj1-x1031.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, T_SCC_BODY_TEXT_LINE=-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:291281 Archived-At: > On Jun 16, 2022, at 11:19 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Thu, 16 Jun 2022 12:09:10 -0700 >> Cc: Eli Zaretskii , >> Stefan Monnier , >> Emacs Devel , >> Daniel Colascione >>=20 >> I also added manual entries for traverse functions, please have a = look ;-) I haven=E2=80=99t add manual for treesit-search and = treesit-defun-query, etc yet. >=20 > Could you perhaps post a "cookbook" like recipe for trying the branch > for some programming language? I mean, what should a user do, after > building the branch, to start using the features backed by > tree-sitter? I presume the list should include downloading parsers > (any recommendations for the relevant sites?), compiling them (or > maybe there are sites with precompiled ones?), then setting some > variables or data structures in Emacs or invoking some commands/modes? >=20 > I think something like that will be useful for more people to try the > branch, provide feedback, and facilitate making its more stable. I do have an article that covers many of the topics you mentioned [1]. = But it lacks =E2=80=9Chands-on=E2=80=9D details, and it is a bit = out-dated (repository moved, we changed the prefix, etc). I can update = it with, say, a starter guide on implementing a minimal tree-sitter C = major mode. I=E2=80=99ll post back once its done. [1]: https://archive.casouri.cat/note/2021/emacs-tree-sitter/index.html Yuan=