From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Make all tree-sitter modes optional Date: Mon, 16 Jan 2023 08:43:15 +0100 Message-ID: <87wn5mkjqk.fsf@thornhill.no> References: <84973.1672843723@hassadar.pretzelnet.org> <83wn62xi3k.fsf@gnu.org> <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37681"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Dmitry Gutov , Eli Zaretskii , casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org, jostein@secure.kjonigsen.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 16 08:44:17 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 1pHKAC-0009Y4-NK for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Jan 2023 08:44:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHK9Q-0001JF-RN; Mon, 16 Jan 2023 02:43:28 -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 1pHK9M-0001Iy-E5 for emacs-devel@gnu.org; Mon, 16 Jan 2023 02:43:26 -0500 Original-Received: from out-246.mta0.migadu.com ([2001:41d0:1004:224b::f6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHK9K-000801-0P for emacs-devel@gnu.org; Mon, 16 Jan 2023 02:43:24 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1673854997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hGixa8sj7G6SOsY8SzGRePFycS0dFVLO3fEngMpxXxg=; b=A7RLVmCAtxRrby6GC4z2TznSXg2OkKIQ6VnewfAIg5mPvR82wbTp5Lk2Lfzsg88mwo/j+e UWmma/eayiqA4r8eAo7GGLE7tZmc7IzFSHTkwR9JXu4V+RF1ZCYBuJ8we6daSrgqHSu88i Exx9BkbEhvWvl7TLFmneKcaxgWBrGotj6U80uKxgyUuEWQMyYaL0NM/zlaYqruFxhewr3W F+nXvLa48FAfcIGPlgRa7QNvUBUwRcsB4zXfnXzyfU85pXw/0yN43s6AMh/iPPL9kdxD+F rx+IqZrHMZXqES0CCRcCp+pXmA7PcXx6gNevJSguRXhxxdc3H5hfmYw98B677A== In-Reply-To: X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::f6; envelope-from=theo@thornhill.no; helo=out-246.mta0.migadu.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:302444 Archived-At: Dmitry Gutov writes: > On 15/01/2023 16:01, Eli Zaretskii wrote: >> You will >> see that where possible, just loading a TS mode modifies >> auto-mode-alist if the tree-sitter support for that mode is available, >> whereas for other modes auto-mode-alist is modified only when the mode >> is actually turned on successfully for the first time. This is >> because some of the TS modes have their own *.el files, whereas others >> share a .el file with other modes, and so loading that file doesn't >> necessarily means the user wants to use the tree-sitter based mode. > > If we *are* going to do this (make all ts mode strictly optional), I > don't think either of this is a good idea: for a given foo-ts-mode, the > user might already have an auto-mode-alist entry configured with another > mode (third-party or not), and they will likely 'M-x foo-ts-mode' to try > how well it works (or doesn't). > > Having auto-mode-alist modified automatically can come as a surprise > either way. > > Note the this is different to having the auto-mode-alist entries set up > from the outset, because the user's alterations override those. > > We can drop the auto-mode-alist alterations from ts modes altogether, to > bring them back when we do decide to enable them by default. I'm fine with either, but I understood your proposal to just remove all the auto-mode-alist additions for emacs-29, then let users config that themselves. Theo