From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Make all tree-sitter modes optional Date: Tue, 17 Jan 2023 21:03:27 +0200 Message-ID: <837cxl2dc0.fsf@gnu.org> References: <84973.1672843723@hassadar.pretzelnet.org> <83wn62xi3k.fsf@gnu.org> <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> <831qnu64la.fsf@gnu.org> <83o7qy4l2v.fsf@gnu.org> <55d39dcb-de2f-fe02-e069-f1dd1e50e59b@yandex.ru> <83edru4jaj.fsf@gnu.org> <83sfg92ryn.fsf@gnu.org> <83pmbd2oy6.fsf@gnu.org> <0380a032-bca0-4225-6f9d-853de49f100f@yandex.ru> <83mt6h2ix7.fsf@gnu.org> <2c61c7c9-da8d-1073-5079-8391f77fefa7@yandex.ru> <83ilh52ha3.fsf@gnu.org> <83cz7d2g1u.fsf@gnu.org> <83bkmx2ef2.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15860"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org, theo@thornhill.no, jostein@secure.kjonigsen.net, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 17 20:04:00 2023 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 1pHrFY-0003tV-6H for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Jan 2023 20:04:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHrEv-00034g-32; Tue, 17 Jan 2023 14:03:21 -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 1pHrEt-00034U-Cr for emacs-devel@gnu.org; Tue, 17 Jan 2023 14:03:19 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHrEq-0003qT-VJ; Tue, 17 Jan 2023 14:03:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sFQKUolDCFjw+EpC/a5tj2FA+nVDJeB7mqbCEv7TOkc=; b=mhof9nZKhdsj JZViNzsZrHwPKgPFdt74s86yBqOHbCwlDuy9lwG4n+i5uhw1N6gvvhdAYdyDm+AcX0hs79WQOGpfd oQCfNhhZK1WRNqOfa7yeRJGPstnzTXrcibsFM0p2afvN+xyz5A2BCgw7vGVSIrv1WFbchKXJTkJVb m3e/JMXJiHy0qNW2qwrBVDqnrf6sEQj8chmpDAtKiMeUC0K60CRbjWEefqCvXZCjXDeDT2r9usqZj ohV45t95SirGMYEN7y09+vM+aRGkFneyq8fb3F9T0z02cjMo88LaQXAVapzLxIE3mFblDEu/CEAZR KaIOLUi8TyPeCG5TUl2r+w==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHrEq-0001ut-8f; Tue, 17 Jan 2023 14:03:16 -0500 In-Reply-To: (message from Dmitry Gutov on Tue, 17 Jan 2023 20:49:59 +0200) 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:302499 Archived-At: > Date: Tue, 17 Jan 2023 20:49:59 +0200 > Cc: casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org, > theo@thornhill.no, jostein@secure.kjonigsen.net, emacs-devel@gnu.org > From: Dmitry Gutov > > >> But I see you are referring to auto-mode-alist here, modifying which > >> will still be necessary for js-ts-mode and python-ts-mode. Which will > >> touch a lot of users, possibly even the majority of tree-sitter > >> enthusiasts, given that JS and Python are some of the most popular > >> languages these days. > >> > >> And yet you rejected my counter-proposal claiming (if I got your > >> position right) that modying auto-mode-alist is difficult/annoying/etc > >> for an average user. To quote: > >> > >> - Customizing auto-mode-alist is not the easiest task, it > >> requires good knowledge of Emacs regexps and alists. So > >> asking anyone who wants to try using the tree-sitter modes to > >> do that is not the best idea from the POV of user-friendliness. > >> > >> So which is it? > > > > Both. I mention auto-mode-alist as the last alternative, for those > > who are fine with going that way. It isn't black-and-white. > > But it's either that, or "turn them on manually", right? That would also > work with my proposal. Your proposal makes it harder by making it necessary to mess with auto-mode-alist. I hope we can make it easier, at least in many/most cases. That is a non-negligible advantage from my POV. > > That's specific to js-ts-mode (and one other, I think) because they > > share the .el file with a non-tree-sitter mode. If there's a > > reasonable way to give them separate files, things would be easier. > > Right. If they were in separate files, then we could write the doc with > suggestions to merely violate the standard recommendation of avoiding > 'require' in the init script. > > > But this is not a documentation issue, first and foremost. > > Inconsistencies in design often turn up as documentation issues later. I didn't design js.el that way. I just assumed there were good reasons for that and tried to adapt as best I could.