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: An anonymous IRC user's opinion Date: Sun, 13 Oct 2024 07:41:34 +0300 Message-ID: <86cyk4vcld.fsf@gnu.org> References: <87plodsjsd.fsf@web.de> <865xq14dwp.fsf@gnu.org> <343c4d04-af53-4da2-9d1c-c616c74821e1@gutov.dev> <86plo8369c.fsf@gnu.org> <63edeeea-1f24-4d3b-abc8-b96b164942e4@gutov.dev> <8634l1zsej.fsf@gnu.org> <9a8b97f8-def3-43ce-b71b-1f09bb05afd4@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10920"; mail-complaints-to="usenet@ciao.gmane.io" Cc: johan.myreen@gmail.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 13 06:42:19 2024 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 1szqQt-0002id-Lp for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Oct 2024 06:42:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szqQK-0001yP-Ii; Sun, 13 Oct 2024 00:41:44 -0400 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 1szqQG-0001xn-H1 for emacs-devel@gnu.org; Sun, 13 Oct 2024 00:41:41 -0400 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 1szqQG-0007iE-56; Sun, 13 Oct 2024 00:41:40 -0400 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=GEI01uPqsBB0utaJ8KN/HGwi/E692lqd90wqsVTt/98=; b=GxdLMoF614ND rsCoMyfaA4bOXQx48yRdDkjSyOvAJ/NNu9y1oaUBmLARRNr/rw2qIsPPzc6vZQZGQuk2yBv4fGqQA w5HWhWYgFjW4sW2JN/YJS5Rm3GiW1G4y0OMADUGK9V4DU6GoSQBsVaIaGwvaoDs1acBG0B8ialzmR midV4C34Za3PIcUB3qRtLfSShKPXspY/vUQwn35Ymgoz+jdk8Crs8lcllYCmzGuPBZS6xzSQyGXGq wfswkADijDKKEXUo77YTIGspXTbEM9fS9IRxbPxExBFsyCdy5oii10QzfB1WbTu1CsglA561Kb+UY wowhgxC5B8jntxQeumE2hQ==; In-Reply-To: <9a8b97f8-def3-43ce-b71b-1f09bb05afd4@gutov.dev> (message from Dmitry Gutov on Sat, 12 Oct 2024 23:27:01 +0300) 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:324530 Archived-At: > Date: Sat, 12 Oct 2024 23:27:01 +0300 > Cc: johan.myreen@gmail.com, emacs-devel@gnu.org > From: Dmitry Gutov > > > Feel free to improve what we have. My point is that it is not very > > trivial; what we have is basically a compromise, which could be > > improved, at least for some languages, if we want to be smarter. > > The proposal I'm quoting is straightforward: if Emacs is compiled with > tree-sitter support, enable the modes and warn when the grammars are not > available. If Emacs is not compiled with tree-sitter, do neither. > > That kind of rule has predictability: for example if the grammar was not > installed originally but the user did that while Emacs was running, the > corresponding major mode will start working the next time the user tries > to enable it. That wouldn't be the case if we conditionally alter > auto-mode-alist based on grammar availability. > > The above approach should be quite easy to implement, if there's > agreement to it. Otherwise, the issue is about choosing the details of > the UI first. It is not clear which modes you suggest that should behave like that. Surely, not all of them, i.e. including those for which non-TS modes are part of Emacs? And yes, I would like to hear from more people what they think about the possible behaviors in these cases, including how to handle missing grammar libraries.