From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: Creating a paradigm for leveraging Tree Sitter's power Date: Sat, 24 Dec 2022 11:29:51 -0600 Message-ID: <4B8E6B0C-1B8F-42F6-BA46-B81368513CB8@easesoftware.com> References: <948662B3-F284-4E89-BFE2-4BCB5007D4EA@easesoftware.com> <5F05BACE-A31A-48EF-94FF-7F9B0DF663AE@easesoftware.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BEC2F2DF-35B6-44A9-9AD9-20988FAAD670"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25152"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , emacs-devel To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 24 18:30:55 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 1p98MI-0006Nl-DT for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Dec 2022 18:30:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p98Lk-0002io-VT; Sat, 24 Dec 2022 12:30:20 -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 1p98Lj-0002ig-EY for emacs-devel@gnu.org; Sat, 24 Dec 2022 12:30:19 -0500 Original-Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p98Lc-0000WW-TK for emacs-devel@gnu.org; Sat, 24 Dec 2022 12:30:16 -0500 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8EB5E7E1905; Sat, 24 Dec 2022 17:30:05 +0000 (UTC) Original-Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 767577E1815; Sat, 24 Dec 2022 17:30:04 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1671903005; a=rsa-sha256; cv=none; b=I/hTj4S+k33Zlp1KRx9a0YkrdqBHxdhUgWAquwg4kuOCEQqzE6RRayZhyEL7dFrSNApN+I jcwJAKwkSN1r6QxLxrlpIKLYk5CNwGyn+a9orCb/g90O1Q4YFsMaoU47IgzC76NOmGlMmy 6dzY8i9LsPnImQ+su+10+SMwkgimJb/LIvTdbwNpExS0uIGA0YWtssJfyi3idnyhQ+bDY5 r6rzRcbkuU2LNAVLB8voTsP7lK6tFdG/3PtcpMVqJWGdXWutqnRkEfMz0kZxDAVMkXUwM9 Bn4Ep/rqITFWQteSfhfz411tsFV8sP3wUqCX2WKohQPRdOa5hZGyhgWZe+WA6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1671903005; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yI9a1S2v5Yrz37hDhZHqrqmUEy4MfRWTr0g0HAYOgWY=; b=2CW5OknY1jZphkWiHtU9TPwisNOSLq0a/QpsbD23HIoeKAzRaP6gKy8X4kgFEzKyAbUWW8 rLyIuTdPe7tO99SSeXj44Hg6FyYedgMfT8dzrdss3Lq1Uk31brsX+Wxqv6gyGRCj7ydseV q2Rhr6RMQ8f8CD0vQwycmAvjoW0rQPmAMkggSV7hWw42C1JXwTiSusfwiOzM+dSUkm9I4n VPb6mm5o6iuL7HlQ9+HAMXULOgY1abLwWuX6Qldmp5OXK6/CB0LCu/xvzxXLd8I6ICCYjr vvNZE35UUxUARK7paEan7qVZnop6CVyYuP5Dja1Z+DcpxRgTNbw6+Zh66oYAiQ== ARC-Authentication-Results: i=1; rspamd-896578cf5-xshz6; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Hook-Cold: 1ce15dfd412e17d9_1671903005343_1010228784 X-MC-Loop-Signature: 1671903005343:4028360815 X-MC-Ingress-Time: 1671903005342 Original-Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.97.74.58 (trex/6.7.1); Sat, 24 Dec 2022 17:30:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:References:Message-Id:Cc:Date:In-Reply-To :From:Subject:Mime-Version:Content-Type:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=yI9a1S2v5Yrz37hDhZHqrqmUEy4MfRWTr0g0HAYOgWY=; b=O5nXz3g1L115URq1syRhFpC0HA drmoyRmXN/2X1Au/+bYY92K7cClSRzr2mld4n+ykGqE2CDJ4rMuFnVgyaEKaelDYbG/FeBt9D2ZHc wsQqSMeOOs1sU+C6e0vrN1VsYAhgk+vtnCAc1AgNKvvIvqYggnrVdAA0kAS/m/mdRdEJZrt4s1xUd q3Y6bFZ4RljR9Y5ldR2wJHpujDmEYN8JOxh959vdZV+AYB02qp2FnhYkxsjWrd06K+jP8xmSajyFG gt6pIkXKRDZkA5p9COYG+gvw6x9/hS/sy/LXSafkUKFC3DsxHbZWIA5QvMuY8hJqt3p2eSxJ4MJcs IfnJi4cw==; Original-Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:57792 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p98LT-003QB4-FB; Sat, 24 Dec 2022 12:30:03 -0500 In-Reply-To: X-Mailer: Apple Mail (2.3731.200.110.1.12) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com Received-SPF: pass client-ip=23.83.212.47; envelope-from=pedz@easesoftware.com; helo=cyan.elm.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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:301870 Archived-At: --Apple-Mail=_BEC2F2DF-35B6-44A9-9AD9-20988FAAD670 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 24, 2022, at 10:52, Drew Adams wrote: >=20 >>>> I'll call this the "primitive routine". The routine would be >>>> responsible for returning a beginning and end (in a cons cell) and = it >>>> would be the routine's responsibility to make sure that the = beginning >>>> and end lie after (in the forward case) or before (in the backward >>>> case) the point that is passed in. >>>=20 >>> You mean beginning and end of (symbol | string | statement | =E2=80=A6= )? >>=20 >> Yes. A =E2=80=9Csimple=E2=80=9D routine for each concept that the = language has that >> would Return the beg / end of that construct. e.g. foo-bar-statement >> would return the beg / end of a statement. >=20 > I guess your "concept" corresponds roughly > to what `thing-at-point's calls a THING. >=20 > Returning a cons with the "beg / end" of a > THING is what `bounds-of-thing-at-point' does. >=20 > Of course, it's based on functions such as > `forward-thing' and those named on properties > `beginning-op' and `end-op' of the THING. > (It's not based on Tree Sitter.) >=20 > If Tree Sitter were to define a `beginning-op' > and `end-op' for each "concept" (THING)=E2=80=A6 Fascinating. I will look into this. Strangely, I=E2=80=99ve used GNU Emacs since it was first released = around 1985 but I tend to stay within very small boundaries of all of its features so I am mostly unaware of 99% of Emacs=E2=80=99 concepts and features. --Apple-Mail=_BEC2F2DF-35B6-44A9-9AD9-20988FAAD670 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5yOa/gCtQpb3oCpljxzk9yzE+MAFAmOnNw8ACgkQjxzk9yzE +MB9gg//SwJ1b+/4EL3L8BHd1mBc9so+IamwwDIWCKY4ILfHfXl8spnvisA2vW0j yrN3MyfpuQbdGMQsJ2fztaxJJ0L3RHDWity/t6Hs+X41qh4Erh9Vqs8N1i994a2X VnWUAz8RFI9YSEnze3DltJyhjZs5pnW/gAw4vCcLHih+iujyhL/2/AZrH6PGiPoi PRNVdAmoNvrPrmigN4NKF/tVC2WhhtQ2xk9NGW7PTa+ylSWRVR8/RC+265Rp5gIM rWLTtKaH3V0/HW6eP5lkdkxxVvZdTGFSPqao0R93hyPCcZU4SYnS2C8vMkX+GPAg UB9QP6bWdD5eSYLYLtWbbVLWcY0N8eg1PABGZ9DoS3SpGityt5kXIgmTNU90IdbO Cj1VD/tJ1Q9GLsMDYgWUwGvJeQP5KfmCvIX48OCDFC5m4LiQ4kkyeQD4HwgyYmDB nkyofOyFRrq2OHeiweki9aLmas+iTUbM+jUcYpubGIRwU4DGHaWfAqlC5l9sx8TU 8BMrvhGFjyDky/b+kU83/3WsuWKcpFFhVkJNW4Q9k+Wv3jhIXdwjsS75ikaovGFZ 7A2XFGB8ByzlLZ4dKd8uztnatF4uUeFguTR7U3YLLCeDCJE0WJgTeQOFwdBmlp7g tw2p6JulvUz+Dz+LfGJOLCKyZ0YIOEdVB06Yk53aNFX+sOr8014= =Wo/H -----END PGP SIGNATURE----- --Apple-Mail=_BEC2F2DF-35B6-44A9-9AD9-20988FAAD670--