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 20:40:01 +0200 Message-ID: <83bkmx2ef2.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19918"; 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 19:40:56 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 1pHqtD-0004vj-EO for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Jan 2023 19:40:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHqsN-0007Lw-Qq; Tue, 17 Jan 2023 13:40:03 -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 1pHqsG-0007GU-OA for emacs-devel@gnu.org; Tue, 17 Jan 2023 13:39:58 -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 1pHqsD-0008Vr-MK; Tue, 17 Jan 2023 13:39:53 -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=tQ8Spu6SQ+vSMmwfUQQe7BE0TSGLxZyOvwOZXRYgz7A=; b=WnWrsuj2Rtlv 6KuBG6J2qrMN1/XLi1LtsFoLlZCd+mXY086Ckg/yWyxz0faJtCatdVdENjLZC3JmFhV3BtDaMeIKR BOFNdE5mYPf1w98tDHLvTDs9hyW6Lmip6dy4MlQTtupQqqPQE3qJFnqFU//xOslj6Oe29ocAsg1AP EygmAqVryeFYUXzZ3iDzcHWydtmo/bPNCLNoyt4zywv+/NvFvj0nE5Rpy/YA5QRxto7mth6nI/3CK nAU1pVAFTAdfutEqV4dBD/X1VFQjFjcorOMk+Lu63eyDlr1akOC129QptQSJmS9pwruyeRZV4kHBD mzgKXQZgCRJYw/s2OxdKrg==; 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 1pHqsA-00046V-QW; Tue, 17 Jan 2023 13:39:52 -0500 In-Reply-To: (message from Dmitry Gutov on Tue, 17 Jan 2023 20:21:18 +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:302496 Archived-At: > Date: Tue, 17 Jan 2023 20:21:18 +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 > > +The new modes based on tree-sitter are for now entirely optional, and > +you must turn them on manually, or load them in your init file, or > +customize 'auto-mode-alist' to turn them on automatically for certain > +files. > > I thought there would be something more in the docs, given that the new > behavior is unusual. What do you suggest to add? > 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. > To "try out" tree-sitter modes, the users can 'M-x js-ts-mode' or etc > either way. But to switch to the said mode, they will need to deal with > auto-mode-alist, again, without any alternative. 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. But this is not a documentation issue, first and foremost.