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.bugs Subject: bug#74339: 30.0.92; CC Mode stomps C TS Mode Date: Sat, 16 Nov 2024 10:18:24 +0200 Message-ID: <864j47iobz.fsf@gnu.org> References: <86zfm1in2p.fsf@gnu.org> <86wmh5hrya.fsf@gnu.org> <86cyiwimlr.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8555"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, 74339@debbugs.gnu.org To: acm@muc.de, Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 16 09:19:25 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 1tCE1b-0001xV-LU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Nov 2024 09:19:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCE1M-0000ii-37; Sat, 16 Nov 2024 03:19:08 -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 1tCE1K-0000iV-Cc for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 03:19:06 -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 1tCE1G-00046Z-Ii for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 03:19:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=ZK/6BFfsoOO4Ij9YlloSnjFt4qoLOyYVc6s+0ky1BEM=; b=VhQ//RjcEd82ageAIKZcpWXqFRqCyAjN/7JXQa105S4LJCRc5SR/fivYniDpX9RZsy09O3a36sLwNQMeZ+9kJOIWK9U9fahKdITZyT+A3o1YoTMmjMF8T5npq9vXg2bsL3MV0C6m12e9BQriwkqmH2rseL339sErIWZm/BW7xBwINewwtOfw9bYHqVrPWZ22A75Ajzfs3u0Tc+XwczkJgS5cRTtiwKsDeTZHNbsirpOFxSslnn4eWXrfkgYsd9fxsp7WGLoJjoqSlpV3Ee57thastWxoT2rd8b0VA7yGqmOWKBqN8b/55TqmH6aA4FdaWKzQChcRmmiqjUeLtBjUoA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCE1G-00054v-7m for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 03:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Nov 2024 08:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74339 X-GNU-PR-Package: emacs Original-Received: via spool by 74339-submit@debbugs.gnu.org id=B74339.173174511819492 (code B ref 74339); Sat, 16 Nov 2024 08:19:02 +0000 Original-Received: (at 74339) by debbugs.gnu.org; 16 Nov 2024 08:18:38 +0000 Original-Received: from localhost ([127.0.0.1]:52004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCE0s-00054K-9T for submit@debbugs.gnu.org; Sat, 16 Nov 2024 03:18:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCE0q-000548-86 for 74339@debbugs.gnu.org; Sat, 16 Nov 2024 03:18:36 -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 1tCE0h-00044K-IP; Sat, 16 Nov 2024 03:18: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=ZK/6BFfsoOO4Ij9YlloSnjFt4qoLOyYVc6s+0ky1BEM=; b=X3gkninmrk1Z i2Y1fP6OqsfV/vf31DDYsg8Z/UK8WiLnPkSair9cG231RuwZ3/9bZ6x6cE5iUJsqXghIwxX9z7zQP aETPbnK4a6kyRtWhkzxmUJWT/BDyY2GyKG7jlsY0FRrrMtODIKBlA4bqtulXS9k/oDR9yA9Jmq8oK IQdYENhgOOjLTGsjrInz0NSkNOA7Ewk0uAEC8ydYTHC2yqp0EPZI7TD8B63/Jq9IEKUfghJZscwY4 U+bA1GxFnt0bTOZVehF/uT1AjrhWTowvHm+HQVrEXnUYglB6upFrqHx8RfpTvaj50Pxh78OJ5Ls4F fK9TcFrE4x1VYBsmxvws4A==; In-Reply-To: (message from Stefan Monnier on Sat, 16 Nov 2024 01:17:41 -0500) 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:295434 Archived-At: > From: Stefan Monnier > Cc: Stefan Kangas , Eli Zaretskii , > 74339@debbugs.gnu.org > Date: Sat, 16 Nov 2024 01:17:41 -0500 > > > No, that is the problem. Have a look at major-mode-remap-defaults, and > > how c-ts-mode uses it to cause the symbol `c-mode' to start c-ts-mode in > > certain circumstances. This is what I'm unhappy about. > > In which way is this worse than what we have in Emacs-29 where loading > `c-ts-mode` does things like: > > (add-to-list 'auto-mode-alist > '("\\(\\.[chi]\\|\\.lex\\|\\.y\\(acc\\)?\\)\\'" . c-ts-mode)) > (add-to-list 'auto-mode-alist '("\\.x[pb]m\\'" . c-ts-mode)) > > ? > > > That "somehow" is the loading of c-ts-mode. I think that even C-h f > > c-ts-mode counts as an "explicit indication" of a supposed preference for > > c-ts-mode, given that it loads c-ts-mode (if it actually does). > > Yup, and the same happens in Emacs-29. Right. Moreover, in Emacs 29 the modification of auto-mode-alist only took care of visiting C files without a mode cookie. In addition, with Emacs 29, once the user loaded c-ts-mode, there was no way for the user to go back to using C Mode; with the changes we propose to make in cc-mode.el and c-ts-mode.el, this will be possible. So Emacs 30 will not regress from Emacs 29, and will make the situation at least a tad better. > > I don't think the current mechanism is ready for the release of Emacs 30. > > I don't see a regression here. Right, and so no obstacles for releasing Emacs 30, once we make the proposed changes in cc-mode.el and in c-ts-mode.el, which rectify the tweaking of major-mode-remap-defaults. > > What I think we're lacking is an explicit setting or command for the > > user to state what her preferred mode for C actually is. Yes, and we should work on adding that. But this will not happen in Emacs 30, especially since we don't yet have a clear idea how to do this. Alan, please help us release Emacs 30 sooner rather than later by agreeing to the proposed changes in cc-mode.el and in c-ts-mode.el.