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#70365: 29.2; Unable to remove suffixes such as Emacs-Lisp/l or C++//l from mode-name variable Date: Sat, 13 Apr 2024 15:00:39 +0300 Message-ID: <86cyqtpj4o.fsf@gnu.org> References: <86plutppjh.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24868"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70365@debbugs.gnu.org To: Animesh Sahu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 13 14:02:09 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 1rvc5B-0006Dd-DR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Apr 2024 14:02:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvc4v-0004pW-6F; Sat, 13 Apr 2024 08:01:53 -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 1rvc4u-0004pJ-Cq for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 08:01:52 -0400 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 1rvc4u-0007FR-3k for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 08:01:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rvc54-000136-F1 for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 08:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Apr 2024 12:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70365 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 70365-submit@debbugs.gnu.org id=B70365.17130096653503 (code B ref 70365); Sat, 13 Apr 2024 12:02:02 +0000 Original-Received: (at 70365) by debbugs.gnu.org; 13 Apr 2024 12:01:05 +0000 Original-Received: from localhost ([127.0.0.1]:60254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvc46-0000tw-P2 for submit@debbugs.gnu.org; Sat, 13 Apr 2024 08:01:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvc43-0000sM-QH for 70365@debbugs.gnu.org; Sat, 13 Apr 2024 08:01:01 -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 1rvc3n-0006vH-T3; Sat, 13 Apr 2024 08:00:43 -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=VYSUCMZdt29FLojsmhecFNEPNbqnLAz2jwaFLX9FL4M=; b=oYg4NDkBKxsx Zwro59tMwuJwFG7DNHGgwLItMCeoBOW1bbvGzoIcRl8tdVzMtqDaS1Z9SweUIy0mdahewsoXZwerv GjeFfwc/288bydzN/hAKj2vo6rL1Bj7/EpRamGsXuZG/Ih2EiCfHz6L1KIWAJZ9fupOMnnAPAgi/W 1KA2uYC8GWHaChhBU2VqrhkHXFhBYFSE6uY2y+kZq2qD5cNNY2iYNgffk5slr79CyGLBreHrB0vkt /nVMDyEQXd0ceHkThdYBCa9dunP5NLWC3+VrApZu5IcmK/f5JYwJjq6Gi5Oi4y0TwsyLML45YEbZj QDKHXv/pyyB+/2WyfKdDvA==; In-Reply-To: (message from Animesh Sahu on Sat, 13 Apr 2024 16:18:20 +0530) 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:283205 Archived-At: [Please use Reply All to reply, to keep the bug tracker CC'ed.] > From: Animesh Sahu > Date: Sat, 13 Apr 2024 16:18:20 +0530 > > I would not like this to be a per-mode fix for every language, I already linked closest I could get to this issue, in > my previous mail: > > > Closest I could find something is here: > https://www.reddit.com/r/emacs/comments/8v8de4/change_modename_for_major_mode/ it suggests doing > something like (defalias 'c-update-modeline #'ignore), but this doesn't seem right way to do it, since its > basically doing only for C or C++ language, same has to be done for java, ts, many more. Also Emacs-Lisp/l > doesn't have similar function that can be suppressed with 'ignore either, so I don't see a concrete way of > doing it. You should be able to do this globally in a after-change-major-mode-hook, I think. Although I don't think I understand how you can do that regardless of the mode, since you cannot know in advance what will a mode possibly append to mode-name -- it could be something you want to leave alone in some modes. So a mode-specific setting sounds like the best idea to me, if you ask me. There's also the other possibility I mentioned: to modify mode-line-modes so as to use some other variable for showing the mode name. You can then control the value of that variable. This is not a mode specific solution. > I would like to have these variables populated by their own modes. Although I don't find a generic way to > disable that in all the languages / major modes. I'm not sure what is it that you expect us to do here. We are not going to change how these mode names are displayed by default, so whatever you want to do it will have to be in your own local customizations. I've pointed out several possible ways of performing such customizations. If this is not enough, or you need more assistance in accomplishing this, I suggest to post a question on help-gnu-emacs@gnu.org, where people could help you implement this.