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 16:52:50 +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> <20210730135758.y7eol56zyszo5boe@Ergus> 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="34897"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: =?utf-8?Q?=C3=93scar?= Fuentes , emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 30 16:53:56 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 1m9Tta-0008oX-5R for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 16:53:56 +0200 Original-Received: from localhost ([::1]:44466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9TtY-0000Hs-0S for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 10:53:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9Tse-0007LV-Cl for emacs-devel@gnu.org; Fri, 30 Jul 2021 10:52:56 -0400 Original-Received: from mail-vi1eur06olkn2018.outbound.protection.outlook.com ([40.92.17.18]:10081 helo=EUR06-VI1-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 1m9Tsb-0000nE-Vv for emacs-devel@gnu.org; Fri, 30 Jul 2021 10:52:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bjmlmI1FnnLNqzcuknJ1n0s+rmmywFsB/PMFQvVXVomoCEQxvoSbK1tdaGb+78Qq7TCXogf+hK1G/IsOM0TMz3xl9e5Dmx8UgMAOSpu9tTqfEE6HOIE6jPCbwPD+fT9dfhrSLIikGCtSF2E2NkTtEG8NTkxMSdqxPMfgCuy/uBVS872BmG+pLxuDiVGSTEOze85imEdFbcnYzFwZe/3QNnVC1df71Kr3N5sK84/9UKpAt+MMhosAgm5AiafrAK9CLpUa4z2SGFvruXXXAxlHihJcLQu4aALRfSHInJtITkyaS4TTTk+a0ChedurZqvD0yHOsufAuOeFAIMKOaEFcUg== 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=SWws1fti/LEw+d6DonjNKagAsoDo3+aNHnc5vA6uzwo=; b=Wf8TXORSIFqn26JvLltlofIFQjH4IkYsOoowA/NvZMKRCKuRYz9M1eD/+dANzY1IieqlFmUXOUa+USFnTyX3DJWhKBqJRvmFaEgPa740nw0LoZNgcyEe4j+8md0shpdOJj7xxr4cJSSzyjkNLL3CXzePvX/xGSfHcaJV18ZgJXXaUjl7WvFjufLQ/2eW4RwL/OpcS5ztS6vu9qE16zteaWas2PHa+z0P92RRY2K3w3zg8LTchiRewNAwtEhb9a6vVphnftJdgjHrpU8rlXzxE1sHL3P94LmmBS28uMmXyzAd5UGdH44mB3bskA1QOWVhnVwsczHkzQqBuqjXTm/qCw== 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=SWws1fti/LEw+d6DonjNKagAsoDo3+aNHnc5vA6uzwo=; b=AugTnq2B0jhUvTwhSioZmi7JoreBDcv+e7YdUkJ1Z01CYaJtwIqJAK+2NUr1jbo+zaZ+oD75YmWuRW/E7dpbpdCs31K8vyPV4W1Q1kR7xsXrUfwUwaPzN9MtTT0RZsDy8fEceitgtaBSxAeU1DdXxo6GmJhIVurigJMdHB4/iiRbaHEecEKE05KxOllqoi2yktLFKjyQlDtcOrQsQXDDAhu3n9JqXfOxaGK3W4SOO2GOFunYamk8fijLH72i7F2UW6Qyqdv6k4S59xSkXlzFOfs53Am7t3PdLEdyCwiIvhSHRnmLX4teNpc/Dip1EmsEi2K04H9MVn/t0Sgn/MzAeg== Original-Received: from DB8EUR06FT049.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::4d) by DB8EUR06HT218.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::220) 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 14:52:51 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:fc35::43) by DB8EUR06FT049.mail.protection.outlook.com (2a01:111:e400:fc35::84) 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 14:52:51 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:EED8A1B75DB4E55536422989AF607DDE02E878DEB7860C809C233BF0D93063EE; UpperCasedChecksum:EB878AD1F3A36FD0F4B5C7BDF3929015E6B1EC330FDC34660F2C3D65C4ADA28D; SizeAsReceived:9065; 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 14:52:51 +0000 In-Reply-To: <20210730135758.y7eol56zyszo5boe@Ergus> (Ergus's message of "Fri, 30 Jul 2021 15:57:58 +0200") X-TMN: [m8FL5hYbL3g6W4i5flSNhi5ngkIrsJC+] X-ClientProxiedBy: AM6P193CA0061.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::38) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87wnp7j1kt.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AM6P193CA0061.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::38) 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 14:52:50 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: aa83fa98-ed7d-4212-0518-08d95369b404 X-MS-TrafficTypeDiagnostic: DB8EUR06HT218: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kKSd7vizB1o9uKxsuhUPwDT07Aut1nUOEULKYaj1HgvK2RCuqiXpKY1KYryDukoG2B+ffQ+sT+E69+ySsEBsl1sC0eL/5GExlpvI++0NsLaqK3WpD4XuXyh3XoyQjJe+KYD+DtjGoNg64DELECd40laoQHv2yP1aINXWzw19T/uLv6mhvIDoEcrqycTBl/JJsJaIKYxEH1R+u6Zn8wI0qtLqjD6U0AQ5eeXTzIpkL6efkM+ocQ0MRzXW2Q543JrbgLemUadLcs0S2wZOFd9CcUD1UlcyJCmFNqa0gOpTS7NhAeYanaJw+OS5/s0yTGSNfGjXzw0qJIWJuu+WOth77916Km4d+A+1qdGNibpFYROgWjo+Ga+q2txIJLavIGAHAiA8qxvw3ygCrXK/604Qbf4pJ4boZ0hoIuSne+ErNvCWCpBFQe6kHtqvzxrCPxRS X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MxUZfDBok5kfLZtgyIGVs3fYDv5Pa6TpBDnYm2/k9lUi/oyEDvBk3Rqi95CrFTsdwE2B5uoQ1MWEp6oIacliVYpQSkCrvY/56/Sl0kuT47kDl5Lz4XISllSJ4QnDpTupXS5yswKr2ESZLLAaRot2/w== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa83fa98-ed7d-4212-0518-08d95369b404 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2021 14:52:51.0024 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR06FT049.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: DB8EUR06HT218 Received-SPF: pass client-ip=40.92.17.18; envelope-from=arthur.miller@live.com; helo=EUR06-VI1-obe.outbound.protection.outlook.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, 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:271852 Archived-At: Ergus writes: > On Fri, Jul 30, 2021 at 03:30:42PM +0200, Arthur Miller wrote: >>=C3=AF=C2=BF=C2=BDscar Fuentes writes: >> >>> Arthur Miller writes: >>> >>>> I undestand that having specialized regex matcher is more efficient th= an >>>> 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 (moder= n >>> 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? >> > > Yes, we care. Syntax highlight for an editor is a basic feature in 2021. Of course, but I didn't meant Emacs should be without one, wtf, it's not all or nothing :). What I said is do I really care if a file of 10k source lines has a word here or there not highlighted, which I haven't noticed with current implementation either. >>Can that syntax tree of TS be exposed to lisp and used for some other >>purposes, > > This is the idea. use the tree for navigations like up-list or > goto-defun for example. Maybe not the tree directly, but the information > it provides (maybe calling TS function wrappers or setting the TS > information as text properties). Ok, that might be useful. > Indeed. As I mentioned before web developers are using VScode or neovim > because Angular, React, Nodejs and Python are painfully supported > (compared to VScode or Sublime). Rust is very limited supported in > emacs, so users rely on external packages like rust-mode, elpy or > anaconda that introduce different bindings, collisions and require some > complex setups for the basics. Don't we rely on external packages for lots of things. Almost all of external packages you mentioned provide more than just syntax highlight, and indentation, so we will probably continue to use those for other reasons even wen TS enters Emacs. > Unless we expect all the users to be advanced lisp hackers to > customize their fontlocking, indentation and navigation functions for > every single prog-mode. Is it considered advanced lisp hackery to add extra keywords to font-lock in their init file? I always think of myself as an elisp noob. Thanks for boosting my ego :-). Don't take me wrong, I mean nothing bad, I just find answers a tad bit too extreme for my taste, but thanks for the input, it is interesting read. I guess I'll be less sceptical and see what TS brings, anyway, thanks for the all the work to all of you who work on it.