From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#69191: 30.0.50; New var `major-mode-remap-defaults`, for packages Date: Wed, 6 Mar 2024 02:03:46 +0200 Message-ID: <66168d52-1951-47b8-8e98-261f4f64ec36@gutov.dev> References: <875xyiext7.fsf@epfl.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3170"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 69191@debbugs.gnu.org To: Stefan Monnier , "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 06 01:04:46 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rhem5-0000b2-Ep for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Mar 2024 01:04:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhelv-0003DY-H6; Tue, 05 Mar 2024 19:04:35 -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 1rhels-0003DH-0S for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2024 19:04:32 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhelr-0006uI-Im for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2024 19:04:31 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rhemM-00059Y-0g for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2024 19:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Mar 2024 00:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69191 X-GNU-PR-Package: emacs Original-Received: via spool by 69191-submit@debbugs.gnu.org id=B69191.170968347219759 (code B ref 69191); Wed, 06 Mar 2024 00:05:01 +0000 Original-Received: (at 69191) by debbugs.gnu.org; 6 Mar 2024 00:04:32 +0000 Original-Received: from localhost ([127.0.0.1]:49291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhels-00058d-Dd for submit@debbugs.gnu.org; Tue, 05 Mar 2024 19:04:32 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:36809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhelo-00058N-12 for 69191@debbugs.gnu.org; Tue, 05 Mar 2024 19:04:31 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 0D82C32000E5; Tue, 5 Mar 2024 19:03:50 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 05 Mar 2024 19:03:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1709683430; x=1709769830; bh=EEOrZXEisQjkZlgiPjdqyu22gaVfjXjjv9QMJZlNBIE=; b= agcOfKGadP455dS2LZGD0KJY9ojTvett/jH2UDp9Ngeuemyq2IWXyChTbROL2MPw hKU7DGXE/yBQMfuluhfb+6yxPsGKMkD56jXiE8crltYULwH/y34jN467UrDgAarz vjEF9LEfK07JpaT2pGt2xEN6tdAt7o6AwayPC2fVN9SotUp38K3K0LJwStZkriey PMx9x0y031Nz8yESjD/NdtKewfnTLFRhyezXhm0Bk30qUKCn2ZeCvldOo1s+LtW6 vnXGJO9MeqpmbpwpIS5Q54rshM1V21FdUs655bzGKxoX/YqJ0BzsP+Wok/E5S2vl gI+c7ZKWOIgWYab6LA/kpg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709683430; x= 1709769830; bh=EEOrZXEisQjkZlgiPjdqyu22gaVfjXjjv9QMJZlNBIE=; b=X LCwxx9KfNY4g1KV5nb5OUGkbLPq/Dm/XKgGxK2PddmCwrkp3mEoNqWYUlYOqFqPw wZMoXXZWI/qzvzwSv7Dt1rA2dXebLCyJ3f0jffRBAZQwTqQPa19h+zNINIYa39Af wtUych5nSFs9rmx7SgiCr4NoVYuqgnUe8wkcF4MQEzq8yO1wN4vmWaEP7QsMNq7W rRt69SdckDVnSos6zTq8zbRl25fFSWI6Bolz/MXMW2kgQLRAMD7ur5npi6sGf1ci pxP97AyK9HlSyViEclf7M4C72mPVNAXSZlImn58himeZ1MZFwGB0vT6p86KicsHD 9+Ic5sF3kj6rbaronsaxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledriedtgddujecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Mar 2024 19:03:49 -0500 (EST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281090 Archived-At: On 04/03/2024 06:25, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: >>> There are some FIXMEs that one might want to address, most importantly >>> whether we should use an indirection through `major-mode-remap-defaults` >>> for all TS modes or only for those for which we provide a non-TS mode. >> My gut says: we shouldn't add out-of-tree modes (e.g. go-mode) to >> auto-mode-alist (they should and already do that themselves); and so >> long as TS modes are viewed as an optional alternative, then they should >> be responsible for setting up major-mode-remap-defaults (so it should be >> a no-op if they remap from an out-of-tree mode that is not installed). > I like the idea of using `go-mode` as the canonical mode, even if we > don't provide it. But I left this part unchanged for now. The idea seems attractive, but what's going to happen in such a configuration when go-ts-mode.el hasn't been loaded yet, and go-mode is (without additional effort by the user) is not installed? Just an error like File mode specification error: (void-function go-mode) , right? I guess it's a bit more meaningful than silently visiting .go files in fundamental-mode, but is that meaningful enough?