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: Turning on/off tree-sitter modes Date: Mon, 25 Nov 2024 14:09:25 +0200 Message-ID: <86o723ikga.fsf@gnu.org> References: <86ttc2rrh8.fsf@gnu.org> <86cyipsp94.fsf@gnu.org> <9cd17f8b-f88c-49f6-9024-0b6d297e18ac@gutov.dev> <867c8xsmri.fsf@gnu.org> <566ac897-ea5e-4141-bcb3-306d43c9118a@gutov.dev> <865xohrvfa.fsf@gnu.org> <86wmgwnyle.fsf@gnu.org> <178dfc7f-bc2d-4e3b-8417-a616ccc0eef3@gutov.dev> <86v7wgnxlz.fsf@gnu.org> <01d83ec8-c02b-4806-8764-38dc89a89125@gutov.dev> <86ttbzojho.fsf@gnu.org> <930f5c8e-1481-43a5-8f1d-2c13a98df74f@gutov.dev> <86r072krq5.fsf@gnu.org> <8b907a41-aa08-4b61-bced-7d4d3fcef4b2@gutov.dev> <87frnhsvp3.fsf@mail.linkov.net> <0d1e2770-0889-4862-8105-8a5f4631b11c@gutov.dev> <87ed31gku5.fsf@mail.linkov.net> <86plmljbsm.fsf@gnu.org> <8734jgftif.fsf@mail.linkov.net> <86ttbwihp6.fsf@gnu.org> <4f8f8b97-6650-4a6f-b121-82964fec49cf@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12683"; mail-complaints-to="usenet@ciao.gmane.io" Cc: juri@linkov.net, 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 Mon Nov 25 13:10:05 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 1tFXun-00033o-Cc for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Nov 2024 13:10:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFXuG-00024d-1d; Mon, 25 Nov 2024 07:09:32 -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 1tFXuD-000225-Em for emacs-devel@gnu.org; Mon, 25 Nov 2024 07:09:29 -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 1tFXuC-0000io-EA; Mon, 25 Nov 2024 07:09:28 -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=G2AOGPeimyOMoH07V2nHl+SIDstipkR0K9uSmg77Z14=; b=l9jtb6fa4GFe z2U0Nr5FoAatt6rSjajxDKuMyjxXTDqA8UfQlL9DU0PR2RZnxosYBNmiSzoYtf+H6zf9kBmMSMW0b u8vKc0j9n1pVWYLYrTBhVbbIKMo+RKHyAg9xRJUPLWRtme6v0+rbbbwhMZnv7ueXiV5N0HNEPNtNM yMJcSP3CzWCH/VcIXzsKok0tBrNVYHnux5b06a2zzUIv/IfI8IkqlMAdg4IvlLTKZiSansSETWxup KFceKcHLYP2uxdAsXweVDs5N3tQm4JnfvrsEQ4/X0lIh6D2HTCj9ci4aafoj+c5jFrD+/o9Vm367A 3lKmhGFPCX2erO5HL+3xLQ==; In-Reply-To: <4f8f8b97-6650-4a6f-b121-82964fec49cf@gutov.dev> (message from Dmitry Gutov on Mon, 25 Nov 2024 02:44:52 +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:325690 Archived-At: > Date: Mon, 25 Nov 2024 02:44:52 +0200 > Cc: johan.myreen@gmail.com, emacs-devel@gnu.org > From: Dmitry Gutov > > On 24/11/2024 20:56, Eli Zaretskii wrote: > >> major-mode-remap-alist: > >> INS DEL Key: js-mode > >> Value: js-ts-mode > >> INS DEL Key: ruby-mode > >> Value: ruby-ts-mode > > In addition, I personally find this UI quite perplexing, and kinda > > doubt users who use it will understand what "Key" and "value" mean in > > this case. > > We could add more detailed annotations to those customization fields, so > it could look more like this, for example: > > Major Mode Remap Alist: > Repeat: > INS DEL Cons-cell: > Mode to map from: js-mode > Function to call instead: js-ts-mode I think this would be a big step in the right direction. Bonus points for replacing "Repeat" and "Cons-cell" with something more user-friendly, like "Set of remappings" and "Remap", for example.