From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitter Date: Fri, 30 Jul 2021 15:30:42 +0200 Message-ID: References: <8735rzyzbz.fsf@163.com> <86v94v3xh9.fsf@stephe-leake.org> <87wnpargnb.fsf@elite.giraud> <87h7gey7zx.fsf@163.com> <83pmv2twrl.fsf@gnu.org> <86sfzwogsn.fsf@stephe-leake.org> <87o8akmy4p.fsf@163.com> <87bl6kezgu.fsf@telefonica.net> 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="16631"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: =?utf-8?Q?=C3=93scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 30 15:33:17 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 1m9SdX-00047J-MJ for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 15:33:17 +0200 Original-Received: from localhost ([::1]:47262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9SdW-0008Qt-65 for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 09:33:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9SbB-00054y-Ic for emacs-devel@gnu.org; Fri, 30 Jul 2021 09:30:53 -0400 Original-Received: from mail-db8eur06olkn2052.outbound.protection.outlook.com ([40.92.51.52]:38255 helo=EUR06-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9Sb8-000401-34 for emacs-devel@gnu.org; Fri, 30 Jul 2021 09:30:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oPtfOv0VNdFig/AoM0+xwdlo3l94BPC9abDRdwFfsw/8+5EFUF9sSLlI8+8GH4KQgj4rNsLTUzxNbx2tyb7vxgiKdNf0rFGw8SrroCmfqKGoOdqkx0Xe2EWf6LKHNpv+TLC0yNB1Tq5mCmpvsDgnm0bhN3JDCrrLvC8f1RGACI8qU5I7BanqOEbJuGwkOzGY3g6c/XFhjt+chRposWycOd4SvovoB0LjLPCNFSbc3wU3b3Tb3wXPF9TWV6Pcq+R4gPvO3z849UhnhUBgWOFCuCsoZt7hVAEb4sC4yJ+zxXYmdywvt7YqIxSSggKwinVgzAdT/ukqRf8Q5z6mSOwVgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RAY5QYuwml9e1/u8eHSJ42uNBwM2IGXGCDGLeuXvGEA=; b=JEiHBbSdCHDmraG2YJAyMkmISCNKCHrJrZoaHWuU0HdgC+7wDApFGn8OQIGageqzvqfpQkaPG6lIOT2l9GWZSoEdzzgpvQyN3pCYHY5993KpJMVPAZWcgVmeKitP+Ppi+JlsCqii5WdYhUP+jyZnBXnybS3wLwIuATidvcnPAwOLXJD7tVyucWifIcw4Y9ky3u9RNCJ4Ck5l7pwZyPinzbIBJTydQ9XCOcXwop2fE9xo90iljQ1liExmuw7b//oUaPuDIfakB0u7Z1vylHDH+92ijaU34tdFkA2WQOP5kNHNa7TrfOLaoSQQRv5vR5bZymPZvAmUsNY4KIS23+ZSlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RAY5QYuwml9e1/u8eHSJ42uNBwM2IGXGCDGLeuXvGEA=; b=m/B8u6mtHKbYJwsmJ3fNfjUFSdvzcLPFtVuJnnzf2k4N85ggNb7vNghSF+BzGODFR/oXq2KZgUb0S4SqbM2+EcNoxMNYaF50WEbT0Q756apIb7TzSX3JSN+0yvqu9lMFk4G40qY4j9mi/glY9BdrrAvchexbO4NWH8wa4KDRMYAWLva8wMwM18Cq5OWn9WHT7Ze0dMsIJh9B77uWIq9KpafNXP0WIMxAQ6WZm4lCKHTsiy+BJNUmeg3tVUGFbboO+2NKMNkmRj2FNWRqI201s6QbAG96a9o7sOOIBDXafRw/qNBpCvMhlwQpkRZkVmdn2QJ7XPCSwGUOeuv7reRMZg== Original-Received: from AM7EUR06FT006.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::4b) by AM7EUR06HT203.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Fri, 30 Jul 2021 13:30:43 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:fc36::45) by AM7EUR06FT006.mail.protection.outlook.com (2a01:111:e400:fc36::336) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Fri, 30 Jul 2021 13:30:43 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:F37FE5A1294F8F09018261501F000094604A3473335FC6C05C0420B37F172FF5; UpperCasedChecksum:C84451453F8D70CD91D0EBE96879A092E9C9AF0FB2BDAD61F448A4CB19F5BEB8; SizeAsReceived:8938; Count:47 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::e47b:760e:fa35:f28b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::e47b:760e:fa35:f28b%6]) with mapi id 15.20.4373.025; Fri, 30 Jul 2021 13:30:43 +0000 In-Reply-To: <87bl6kezgu.fsf@telefonica.net> (=?utf-8?Q?=22=C3=93scar?= Fuentes"'s message of "Fri, 30 Jul 2021 14:52:01 +0200") X-TMN: [E8W0JxGRDtfz3AlY0IYSkGjt0t6OIPfI] X-ClientProxiedBy: AS8PR05CA0003.eurprd05.prod.outlook.com (2603:10a6:20b:311::8) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <871r7gj5dp.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AS8PR05CA0003.eurprd05.prod.outlook.com (2603:10a6:20b:311::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.20 via Frontend Transport; Fri, 30 Jul 2021 13:30:43 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 770e6a6c-2fda-49ed-70c4-08d9535e3afc X-MS-TrafficTypeDiagnostic: AM7EUR06HT203: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: roQuvZLKlJ5SyKUy6Bjhzmvygpnj7qoLNFHBlA2gQBZHMCJuIHB1KzLZ9uEwxa5P5Zxuf280MeQEaz6nBgaM3plaP/V2/fZj4q+D4q5LvCzWbDO2+wyync2HV9VEGQrjEy8xf/NgHpPmpMXSW1mK0kQHg3c45HnPprxiaXwo73VO54AagKW9U677Tmfmc8HIcFOfvC8RxrVgph8A+F90xlYF37U1PVUP39lca/ftNU/C37osCS3qT6J/3PLTIZOeIh+kmPc3P5UzLoUw9Q9VZRs8clhKKuhH7GClb9THLLOt+dXc5Br2VAyyL9j4v8XqQgDth8CnpgIxlePtU5ncxwFkBb5rqtyAcWlA4HQ2/m66MTVtFlWeRDZ19qT+GgarlVv/KjAkG2kqarGXyPk4NzedC1ELxVKIYHr7twDIT7d8/jM2pOkKBJ9FN2hqxcTn X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qmbOaRuZnGO7EVMJNAmcj/GwYa4eW/TBqh0D5dPSDJDb9VSv9CLUNliQgem25xNRxPqmp+cMINmWFaiug5splot4UcedFgePuSmiQFK3b1+ft06+x3OkDvmP9HkhG5I6c97O1/Q++n1X2VpVe6Oizg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 770e6a6c-2fda-49ed-70c4-08d9535e3afc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2021 13:30:43.4794 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT006.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT203 Received-SPF: pass client-ip=40.92.51.52; envelope-from=arthur.miller@live.com; helo=EUR06-DB8-obe.outbound.protection.outlook.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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.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:271843 Archived-At: =C3=93scar Fuentes writes: > Arthur Miller writes: > >> I undestand that having specialized regex matcher is more efficient than >> some generalized regular matcher current font-locking in Emacs relies >> upon, but is it *that* more efficient to be worth the extra troubles? > > AFAIU this is not about efficience, but mainly about correctness (modern > languages are increasingly more difficult to analyze) Ok, I understand, and I can buy that one. Question is if it is still worth just for the syntax hightlight and indentation? If I get some spurious color here or there sometimes not colored, do I care? Can that syntax tree of TS be exposed to lisp and used for some other purposes, or is it just internal to TS and only output we see is some colors on the screen? > and also about > decreasing the maintenance load. Sure, but it is also a limitation. If Emacs will rely on TS maintainers to create new grammars and update existing ones when language changes, it means Emacs users will have to wait for changes until they are fixed upstream, similar as how gnu/linux distros work regarding packaging. Of course, a user who wish to modify or introduce new language can always rely on old font-lock or go through pain of TS toolilng based on JS and custom tools. Lisp frontend to that toolchain can probably be developed but that is even more work. > In the process, Emacs gets support for > some new languages too. Yes, it is always nice I guess :). Is there really demand for some language currently provided in TS and not in Emacs? I don't know, I am maybe overly sceptical to TS; I don't mean it is a bad package, and I am sure it has it's place in other editors, I am just not sure how it fits in Emacs where everything is easily configurable and extensible.