From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?VHXhuqVuLUFuaCBOZ3V54buFbg==?= Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] New packages proposal: tree-sitter Date: Sat, 28 Aug 2021 23:52:37 +0700 Message-ID: References: <83pmtzqfe0.fsf@gnu.org> <3FB80347-178E-46A4-9B15-A054578FBD0C@gmail.com> Mime-Version: 1.0 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="5668"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 28 18:53:38 2021 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 1mK1aM-0001Ax-L0 for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Aug 2021 18:53:38 +0200 Original-Received: from localhost ([::1]:41826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mK1aL-00081e-6E for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Aug 2021 12:53:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mK1Zh-00070z-OO for emacs-devel@gnu.org; Sat, 28 Aug 2021 12:52:57 -0400 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:35562) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mK1Zg-0002tW-6n; Sat, 28 Aug 2021 12:52:57 -0400 Original-Received: by mail-pf1-x430.google.com with SMTP id x16so8605909pfh.2; Sat, 28 Aug 2021 09:52:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=yewYH/uXK7GMqRUSj5utAH5qSSLEZSw2HCN48bR3Aug=; b=Xc4/dcbPoruQXwLGm4nW5W04gm8rYi45fIUQS6ROBHUFhId50J8cMmWz9D7czn8F7C yEYvNw91iob4vrMPL6Yo1bBFnZD6Ooej4PbS9yNY9KOtGxIXM+1c2YjXBHMkObWwTs3v bdTIYUj0rZ9Ma4MNZUB5eZMtqvhb4hGRwDe5sn2jDpLGEK50frPNIcvrfZhY5y2XLrRZ ZFEtyvXHwKVTk/CUIPiHDxcSASL27TNRyLfViAr6wiULlT9HPmq/Gr2i+LY3ZY5ctraJ zkoBT4wl2Caw4JOSki76ZeAVXyQtJPE8922KU1dxigMNRimnK3LYDx772dUz8nIcS2/A RVFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yewYH/uXK7GMqRUSj5utAH5qSSLEZSw2HCN48bR3Aug=; b=RzcgDReDodoo5bZxsXdq8DR4lzgEbA4Bj9hqIlejXYvRJhT0zn7esCP/Z8PLMJM8Ks YTgsM54751/+jg/mgo9qRmUQq1TzThCFBwHtBtTMRdIgObagoVPJONaiK07fhriCsKXA eESw/d8TaSzwKyyZStMfCeiedYXXksSgILhNOjXXI8KPHNajDNY2oZ0/1DYLhP7OkeGR vD/XIS7RsWJyfFo2/0BoEgueAkoD2ZSCRZL8ubZK3kmaK6hUbUl7t3Rr3vL4RZ9ffCZ2 rtBQIuN8l0Kq0lfxeLSh06j81aSiqvwjSCxRgrzWQt3oOSF0zo21E/lwKpNVd7woxygr J4Zw== X-Gm-Message-State: AOAM532eVxhvt34jOov+dmV+dq/4xm3v5Pbav6QJN6f+QoWHGhfrSIWr lCBo+iY7Ri2pJ6loVsRpCJvBIrt2rIiDJjigzkQ= X-Google-Smtp-Source: ABdhPJwG4NUFGVILVoNa7Yom9ilKRGe3swLuvF6oda8zPRc/Kcsn4mA2yiYJyZ4xQYK8v2Sll05hNToYyH5Tn6lIsY0= X-Received: by 2002:a63:2bc5:: with SMTP id r188mr13087345pgr.179.1630169573557; Sat, 28 Aug 2021 09:52:53 -0700 (PDT) In-Reply-To: <3FB80347-178E-46A4-9B15-A054578FBD0C@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=ubolonton@gmail.com; helo=mail-pf1-x430.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.23 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:273340 Archived-At: > I'd be much happier if you could coordinate with Yuan Fu > , who works on integrating TS into the Emacs core. That's a good idea. I'll start by reviewing that work when I have time. > This stuff should IMO be in core, not in 3rd-party packages, let alone > on nonGNU ELPA. As I've already said before, I don't see this as an "either or" situation. = I want tree-sitter to be integrated into Emacs core too, eventually. Seems li= ke we are still a long way from there, though. These packages already work, and a= re used by many people. > I guess I should have reached out sooner, communicating that I=E2=80=99m = about to do it, but on the other hand I don=E2=80=99t want to just come in = and talk about what I=E2=80=99m going to do and such and such, before I act= ually did anything. And my general understanding is that there aren=E2=80= =99t much interest in integrating tree-sitter into the C core. So... Great initiative! To clarify, again: I wanted tree-sitter to be integrated = into Emacs core, and proposed the dynamic-module-based approach as an interim solution that would better facilitate experimentation while we work towards that end goal. That has worked out reasonably well. When Emacs core has tree-sitter integrated, these packages can hopefully be deprecated. > > Can you tell which functionality is missing from Yuan Fu's work that > > is supported by those 3 packages? Can that functionality be added to > > Yuan Fu's code? > > The code is at https://github.com/casouri/emacs, in the =E2=80=9Cts=E2=80= =9D branch. The main things to look at are src/tree-sitter.c, lisp/tree-sit= ter.el, and doc/lispref/parsing.texi. > > There is an on-going discussion about tree-sitter API in Emacs, starting = at https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00246.html Thanks, I'll check it out. In the meantime, please feel free to study the packages, borrow the code/ideas/design decisions, and ask questions about t= hem, or about tree-sitter in general. Thanks, -- Tu=E1=BA=A5n-Anh Nguy=E1=BB=85n Software Engineer