From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Suggesting that feature/tree-sitter be merged (was Re: Tree-sitter and major mode inheritance) Date: Fri, 18 Nov 2022 22:34:13 +0000 Message-ID: <874juvhoyi.fsf@posteo.net> References: <0249C656-21C8-49F2-B979-A1894BF80637@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="38839"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , emacs-devel , Theodor Thornhill , Eli Zaretskii , jostein@kjonigsen.net To: Jostein =?utf-8?Q?Kj=C3=B8nigsen?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 18 23:35:05 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 1ow9wt-0009qP-HA for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Nov 2022 23:35:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow9wI-0001am-BE; Fri, 18 Nov 2022 17:34:26 -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 1ow9wE-0001U5-OA for emacs-devel@gnu.org; Fri, 18 Nov 2022 17:34:23 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow9wC-0003Jx-0m for emacs-devel@gnu.org; Fri, 18 Nov 2022 17:34:21 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 756A0240105 for ; Fri, 18 Nov 2022 23:34:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668810856; bh=M+WPqI6ZkYwCKWyLnq87qZWCm3ZtPvHC9jv5JoSeIho=; h=From:To:Cc:Subject:Date:From; b=bzgbESH5tnu9b/dJA4LC1Sy+Sbm9v6mnFMMaqY1oF7TbW0ZF7pDIHq3Q8dP0kB+jU ffRI761a/uTFlFXjMYmZeeY/Oxb04WrcUKotqrNADbOtcbk+7k4KhiYu9j8L4Yx8mW f+PJ/a30kaYk8ddgSavNCFhFeMM3EiE3dHb/ySHyPSPenlvx0P5QYltRfOJHjCEwJe 0mjYEaFbBwhT0ed2jZBLElVIuDplEE8pXFxKns2npCWde0ZdcaK+evQzgk6jz9E2C3 nzJdvLkD3TalNbyP8OsIE+WoqZrZZIM+3skFgeiRHh8TeiaE2pYEiDoZSSeHp2oYF6 Z3PuEJALsL2jw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NDWmP07CVz9rxH; Fri, 18 Nov 2022 23:34:12 +0100 (CET) In-Reply-To: ("Jostein =?utf-8?Q?Kj=C3=B8nigsen=22's?= message of "Fri, 18 Nov 2022 22:54:49 +0100") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de 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:300125 Archived-At: Jostein Kj=C3=B8nigsen writes: > Instead of waiting for "every" major-mode to be re-implemented into a > tree-sitter derivative in the feature/tree-sitter branch before we > merge... How about we just accept the current "core" tree-sitter > implementation as good enough, and consider merging that to git master > as is. I think this sounds like a good idea -- as someone who has mostly just been following the discussions. The core bindings and major modes that are based on these are separate issues, with a clear dependency linked them. As an aside: This might also be a good opportunity to clean up some of the current major mode implementations and make them more consistent. The issue with custom options to enable tree-sitter for every major mode has revealed an inherent duplication of features. There are other inconsistencies, especially regarding bindings for equivalent operations (e.g. in interpreted language with a repl, how to load function into the current session: Lisp, Prolog, Python all differ in minor details). I can imagine a more specialised `define-generic-mode' could be of use here, along with more "abstract" major modes for various types of programming languages (using `prog-mode' as a base to add `compiled-prog-mode' that has generic commands for building program, `interpreted-prog-mode' that has generic commands for REPL communication, ...), where the tree-sitter configuration would be one of the attributes these modes would specify. [...] > How about it? Are there any good arguments for NOT merging > feature/tree-sitter at this point? :) The current branch has major modes, should these be deleted before merging?