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: Sat, 12 Oct 2024 10:34:12 +0300 Message-ID: <8634l1zsej.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11188"; 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 Sat Oct 12 09:35:12 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 1szWeb-0002ix-Qo for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Oct 2024 09:35:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szWdm-0002oz-NT; Sat, 12 Oct 2024 03:34:18 -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 1szWdj-0002ol-VU for emacs-devel@gnu.org; Sat, 12 Oct 2024 03:34:16 -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 1szWdj-0003lZ-D4; Sat, 12 Oct 2024 03:34:15 -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=CUDkyo4QOUJjWu3Qzu84IUfK5oRcd25znXLa86geJT8=; b=JayUgasXY06Z 0GLqRfEPEBbxMFKg8aYUJJyA7zm5qudZw9PfI3C3K4133haeOD3Fx5Z3qHXdGqG0dFRwL5qfxg3ky hVEigeNUh31uzV5Jlz/dZCWAbA4gnkhcgvKEspu1U3u2h8gBeRa61jviQ1JDxbBORNtN+mSMudOGa wA414J9yza68NZ9/3WQwDk7GNCBDXrgSTWH1sLCzHZFh13rZ0UzyyRMqRUHmk1W6Dga8LFZPuU42W p5KjF2o65nPFRUz/RdP+lPCUBOal2wlAsJsFE2TNbtqDwlDjAY/7+jvakGVyFR20Wu0SLJKh6y+MG paEx+Sm3O+YPYCUG8k/38g==; In-Reply-To: <63edeeea-1f24-4d3b-abc8-b96b164942e4@gutov.dev> (message from Dmitry Gutov on Fri, 11 Oct 2024 23:30:12 +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:324508 Archived-At: > Date: Fri, 11 Oct 2024 23:30:12 +0300 > From: Dmitry Gutov > Cc: johan.myreen@gmail.com, emacs-devel@gnu.org > > On 10/10/2024 07:56, Eli Zaretskii wrote: > >> That seems unlikely: as long as the auto-mode-alist configuration for > >> rust-ts-mode is done early on in Emacs's startup, any installed 3rd > >> party package such as rust-mode would add its config later, and thus > >> have priority. > > I don't have objections to making Rust recognized automatically and > > activating rust-ts-mode, if people think this danger is low or > > non-existent, and if *.rs files are not commonly used for something > > completely unrelated (e.g., I see on my Windows system quite a few > > *.rs files that seem to be some kind of Windows data files). > > Actually, thinking back the last time we made such a move, we got a > report from a user who preferred to have files in question (*.toml) in > fundamental-mode, because they didn't want the hassle of installing the > toml tree-sitter grammar (bug#60559). > > The said user didn't have Emacs compiled with tree-sitter, so if we > wanted to revisit that issue, we could enable ts mode globally when > Emacs is compiled with that support, and when it isn't, keep them out of > auto-mode-alist. If we want to be selective, we should also check if the grammar library is installed. Or we could tell the user, when a Rust file is first visited and the grammar is not available, that we recommend to install the grammar. Either way, this is not very trivial, and someone should do the work of designing the best UI and coding it. > > I even pass --without-tree-sitter to configure now. It seems > particularly surprising to me that I explicitly tell emacs "don't > use tree-sitter" and then it immediately starts complaining to me > that it doesn't have tree-sitter. 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.