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: Unifying "foo-mode"s and "foo-ts-mode"s Date: Fri, 30 Dec 2022 16:09:48 +0000 Message-ID: <87v8ls7u0j.fsf@posteo.net> References: <877cyagmti.fsf@posteo.net> <831qoi85u7.fsf@gnu.org> <87mt76f4n4.fsf@posteo.net> <83sfgy6l0n.fsf@gnu.org> <877cy9b1k0.fsf_-_@posteo.net> <83zgb55409.fsf@gnu.org> <87fscw9av0.fsf@posteo.net> <83sfgw6g8m.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="14221"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, casouri@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 30 17:10:41 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 1pBHxw-0003YA-FC for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Dec 2022 17:10:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBHx6-0002Xr-NC; Fri, 30 Dec 2022 11:09:48 -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 1pBHx5-0002Xe-3n for emacs-devel@gnu.org; Fri, 30 Dec 2022 11:09:47 -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 1pBHx2-0007UV-Ne for emacs-devel@gnu.org; Fri, 30 Dec 2022 11:09:46 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 815F62401E7 for ; Fri, 30 Dec 2022 17:09:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672416582; bh=XmgL+IMhMRr8riIuTuETLVuTlHTO1iuxd2gCQS8OQzk=; h=From:To:Cc:Subject:Date:From; b=rJnnWsLDBy40ktNVg85G7dzubXtRVAlq6XmoboOFF7v1o+4rduAgcmo/OYbd371in xedsXA4PEz/WTw7fv0gxl9hIGL95Do3b+xspWTD9rmTvtgEAsKLAU4kkm+FuOcanXu k3uBkHbnB7ZjUYkKDLJoJeaakAuCI4ZWaA2M9OJknN7ly0uAV7b+ejRjGXPR6NG2bS G0DsrSixVPueGyVBnV1b25HPsQnq50HapI5utgy1Q4sTrBdesi7bwQiLPiuCbbh+6c m9GalpSoNv8y1E5Pj52uYzjyQYdXHjKgaEvoqrWRStuMDkoKN0rP9zym2xWdQwqOU+ B2UJmAW5pZLoA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Nk9FK6k1Fz9rxF; Fri, 30 Dec 2022 17:09:41 +0100 (CET) In-Reply-To: <83sfgw6g8m.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Dec 2022 17:52:41 +0200") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, 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:302123 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: emacs-devel@gnu.org, casouri@gmail.com >> Date: Fri, 30 Dec 2022 15:20:35 +0000 >> >> Eli Zaretskii writes: >> >> > I think we want to let the users say, for every single mode, whether >> > they want to use the treesit-enabled variant or not, and also to be >> > able to go back to the non-treesit mode later in the session (e.g., if >> > they don't like the results). A list is not a convenient means for >> > doing so. >> >> How come? When presented in the customise interface we could make it >> out to be a set where users get to pick what modes they want. And >> updating the value works fine whenever a mode is re-applied. > > The need to manipulate a list when all I want is to turn on or off a > single feature is a nuisance. This shouldn't have been an issue. It is simple to write a command that toggles tree-sitter support for the major mode in the current buffer. >> > What does this mean in user-facing behavior? Does it mean that if >> > tree-sitter is not available, or the Python grammar fails to load for >> > some reason, Emacs will silently fall back to the "traditional" >> > python-mode? If so, I don't think this is what we want. The failure >> > for loading tree-sitter support should not be silent. >> >> I am not sure why? Tree-sitter is an improvement in that it allows >> Emacs to provide better highlighting and knowledge of the syntax, but in >> the end it isn't something you think about actively -- or even should >> have to think about.This is all backend stuff that doesn't interest the >> casual user. I strongly believe that the principle of "graceful >> degradation" is the right approach here. > > You assume a lot here. First you assume that everyone will see > tree-sitter as an improvement -- that is not a given, and moreover can > vary from language to language. Second, you assume that whether > tree-sitter is used doesn't interest the user -- again, not a given. > Especially since we currently ask users to install the grammar > libraries. To me the ideal would still be that tree-sitter support is provided by the distribution, just like how package managers have started bundling libgccjit for native compilation, instead of requiring the user enable it themselves. > Your strong beliefs in this matter are noted, but I don't share them, > and think that we should collect actual user experience before we make > such significant decisions. > > Btw, you were previously expressing concerns about the risk of > committing to some strategy too early -- well, I think what you > propose will commit us to some strategy much more than what we have > now. It is a bit tricky for me to argue this point now that I have agreed it shouldn't be done now, but I don't think this is a greater commitment, since the user interface would be reduce from a number of major modes to a single user option (another design principle I stand behind). The only other commitment would be that :parser-conf would be exposed as part of `define-derived-mode'. >> And in the end, if the tree-sitter support is hidden behind new modes, I >> know already that most people (who don't use starter packs) will never >> notice their existence and won't make use of the support. There are >> people still using linum-mode, even though display-line-numbers-mode has >> been around for a while. > > There's a world of difference between tree-sitter support and a minor > feature such as display-line-numbers-mode. Just look at Reddit as one > example. I am not sure what you are referring to here. My point was just that features that have to be enabled manually are usually never enabled by non-enthusiasts (which I believe are the majority, even for Emacs). > I'm sure tree-sitter will be very visible to users. Maybe I am in a minority here, but I know I am not alone, in having to double-check if tree-sitter is enabled or noticing what it even changes. I am not quite saying it is a placebo, there are certainly tricky C++ fontification cases where the difference is obvious, but simpler languages like JSON, CSS or to a degree even C the (visual) difference is rather minor. >> > These are exactly the aspects of the behavior we discussed a month >> > ago, and what we have now is the result of those discussions. >> >> Could you point me to the thread(s)? I did not have the time to follow >> the threads in detail a month ago. > > Sorry, I don't have them ready and cannot afford looking them up: too > many things on my plate. Perhaps someone else will do that. No problem, I'll try to find them myself. Thanks.