From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Creating a paradigm for leveraging Tree Sitter's power Date: Sat, 24 Dec 2022 16:13:05 +0100 Message-ID: References: <948662B3-F284-4E89-BFE2-4BCB5007D4EA@easesoftware.com> <78FAB063-180C-4700-81E8-81BC9D657D4A@thornhill.no> <26841F01-ADE5-422F-A0EC-0F0798EB40E5@easesoftware.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="36905"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Yuan Fu To: Perry Smith Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 24 16:14:07 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 1p96Du-0009KL-Kn for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Dec 2022 16:14:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p96DC-0003yl-9Y; Sat, 24 Dec 2022 10:13:22 -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 1p96DA-0003wy-24 for emacs-devel@gnu.org; Sat, 24 Dec 2022 10:13:20 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p96D7-0006aX-Ig for emacs-devel@gnu.org; Sat, 24 Dec 2022 10:13:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1671894795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AyFx8/VMNbVgXNRrCHxGJUfwactOtkGSun4Mzdp6j64=; b=ZFqLoX2+eQuVXhR80lQIyfgY0HGgNlwPx+zHk1lyvvDUroq1FeGqWxfJvvFKV30o1C8BgM PpOuqBZd6Zbu64L1OOggyuoPHC+JyRoC4jXw5Cw/Mk7W9lM7oTJXKPtEOU902JClQkPDc2 RX51rkdB5GaYBjnKWIc5ZB7SA6z+eGx8Aq/dGY4L6AMBAeXWciRWFCy6hMfsX1AcNCFe4G 8DKl/4GbbYmXLrIHZF1r7aU6HY/f97V0oDUAR0eshV+fePKaP+Z3YbWqp9qhO/plXp3c+k bbCARH7Aqb/Np9EHGmVaDUDB8KoN5R7tYuE1Nq9z2yeUFB5L4HXwRr6ipZzJ2g== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <26841F01-ADE5-422F-A0EC-0F0798EB40E5@easesoftware.com> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=188.165.223.204; envelope-from=theo@thornhill.no; helo=out2.migadu.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, SPF_HELO_PASS=-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:301851 Archived-At: On 24 December 2022 15:57:30 CET, Perry Smith wr= ote: > >> On Dec 24, 2022, at 04:07, Theodor Thornhill wrot= e: >>=20 >> Yeah=2E One shortcoming of tree-sitter imo is that the parser author de= cides what the nodes are named=2E So I think we need to create a framework = so that every mode can map over ast-names to Emacs concepts=2E The goal mus= t be for the normal Emacs things to require little to no changes, but get t= he benefits from treesit=2E > >To me, in my brain, Tree Sitter is far more expressive and powerful than = existing concepts=2E =E2=80=9CLittle to no changes=E2=80=9D to me implies = fitting a much larger concept into a smaller container and sacrificing the = possible expressiveness and power=2E > Yeah I agree, but for many things such as movement, there are some pretty = advanced utilities already in Emacs=2E Would be a shame to just implement i= t all in an incompatible package just because we didn't try really hard to = incorporate it :) >> I think we should just start doing that immediately on the master branc= h and allow for "big" changes going forward=2E We should settle on somethin= g good for Emacs 30, hopefully=2E >>=20 >> I'm a little worried we feel we need "complete" proposals too soon=2E >>=20 >> Let's get all good ideas on the table, implemented and installed, then = we can consolidate after we discover pain points etc=2E >>=20 >> I'm working on changing the forward/backward thing and transpose=2E Not= only for tree-sitter, but for others as well :) >>=20 >> What do you think? > >Yes=2E I completely agree=2E I guess for others, you can take my initia= l post as =E2=80=9Cthis is the direction I=E2=80=99m exploring in=E2=80=9D = but it is helpful to get feedback of new ideas and experiences from past mi= stakes=2E > > Yeah I'm in no way objecting to anything you say=2E From experience (when = it was mostly Yuan and me) these things solidify over time, and the more th= e merrier! Theo