From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74339: 30.0.92; CC Mode stomps C TS Mode Date: Thu, 14 Nov 2024 12:16:38 -0500 Message-ID: References: <868qtnfd2d.fsf@gnu.org> <86r07elwoh.fsf@gnu.org> <86h68al2qz.fsf@gnu.org> <697529d6-0591-4a80-b640-7ddce7dc246b@gutov.dev> <86a5e1kbg5.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17840"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: dmitry@gutov.dev, 74339@debbugs.gnu.org, acm@muc.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 14 18:17:36 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 1tBdTM-0004Rs-E1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Nov 2024 18:17:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBdSu-0000KZ-GL; Thu, 14 Nov 2024 12:17: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 1tBdSo-0000K4-PF for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 12:17:05 -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 1tBdSo-0008DT-Gq for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 12:17:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=jgRQTqhKXnzpliqjIWFavLO7IWLhBucYAH6ge56ggl0=; b=rqRfWluNmcKYgY/VsCDzxtfK0jwtLSZ9dYHkbpDgKX8CqQuA1wblfLLlON3WDL0u4EmYfjF5dPUKMuzsIuF5FFup3CUxf/VYgD5sajN32v7o4buYhIcS8exFa10CHZuroeKNrRtIT0XHiIwLPa5JDB1D0M05d0/Dfv39gHlvxj1SBzgrxjiuE9JjoH21I3GdmtVaDPrCjszhsxUP8V7KipDBwTc0yuO53oc4uCv44RGFTFlgFjpKoZ1h7eJIx4+BHFDEEGt+/vGk9sV+jI8eZCm/p3eEtFbUDXKtJ6w2d63WBXvUOjswEaI0VhWYCZVrPcWO1xSDKbizmd9Nd3vU8w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBdSo-0001XP-5W for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 12:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2024 17:17: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.17316046095885 (code B ref 74339); Thu, 14 Nov 2024 17:17:02 +0000 Original-Received: (at 74339) by debbugs.gnu.org; 14 Nov 2024 17:16:49 +0000 Original-Received: from localhost ([127.0.0.1]:47022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBdSa-0001Wr-KJ for submit@debbugs.gnu.org; Thu, 14 Nov 2024 12:16:48 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:55811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBdSY-0001WY-Mq for 74339@debbugs.gnu.org; Thu, 14 Nov 2024 12:16:47 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 47D4A442A37; Thu, 14 Nov 2024 12:16:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731604599; bh=Eh8xxuh47rUdajW3eu+pEY3K1YjYjiBVZ9wyXghzcNg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=jhOLM4TCuR4lJxks0HVjivMerEplyck1Hl3Xwe3dCmy4ChaPHNIbcI/xlgUdrfZ/S tiScfNmj8kLguo2WrpSEPfTiYrs/VyBuNqXOTEyKb56ixr2cs+AWItWDf0S+HiKLjR 2x72gj0o4ign1wSy8GexXD6Ri4G2VoZyLQsR2GQUHWtpmrMgD2yW8ScUUHVsY9aSbc Ln5Dxf7860hSJwiyT/HRHDh+4ieGbWj/k6a7lDfIgZPSXdQf11xibHHCpU4VrHxxUN dH5hiFA/wBMuuvjog+Y9tCCSJgLfmxidu7Wi5K4Wbj/rtzYD0urfJo5lkQzkD3VLhU Z6HMnj7uRAmng== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8334344261C; Thu, 14 Nov 2024 12:16:39 -0500 (EST) Original-Received: from alfajor (modemcable005.21-80-70.mc.videotron.ca [70.80.21.5]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 58A141204D5; Thu, 14 Nov 2024 12:16:39 -0500 (EST) In-Reply-To: <86a5e1kbg5.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Nov 2024 18:49:14 +0200") 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:295350 Archived-At: >> Indeed, I think loading a package does not show a strong user >> preference. As we've seen, it can happen "by accident" in various >> circumstances that are only loosely related to using the code in >> that file. >> Invoking a mode is a significantly stronger signal. Dmitry wrote: > Stronger yes, but is it strong? One might as well be testing the mode, > without intention to set it up as the default. And how much does it > help anyway? The result can only last until the end of the current > session, after which the user would need to use one of the > other approaches. I can't disagree. Eli wrote: > But AFAIU the code in both c-ts-mode and cc-mode is written such that > just invoking the mode (after the mode's package was loaded once) > doesn't modify major-mode-remap-defaults. Indeed. I had proposed a patch which sets `major-mode-remap-*` when we enable the mode rather than when we load it, but it was rejected because supposedly it did not correspond to the "least bad" compromise that resulted from a long discussion. > So unless I'm missing something, the current code doesn't support what > you think should be the way for users to express their preference. AFAIC, "the way for users to express their preference" is by customizing `major-mode-remap-alist` and is a different issue than the setting of `major-mode-remap-default` we're discussing, which is about trying to *guess* the user's preference. Stefan