From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Howard Melman Newsgroups: gmane.emacs.bugs Subject: bug#30978: 25.3; Suggestion: define-minor-mode should define mode-lighter variable Date: Sun, 25 Jul 2021 12:43:25 -0400 Message-ID: References: <874l3ou42z.fsf@mouse.gnus.org> <87sgcdft5w.fsf@gnus.org> <87pmwadno8.fsf@gnus.org> <97892e0eebeeff0413287058d68ad86b@webmail.orcon.net.nz> <87r1fmx1qx.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12636"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) To: 30978@debbugs.gnu.org Cancel-Lock: sha1:NNgxMjXcnYQRqht3UPFdvWIVvx8= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 25 18:44:12 2021 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 1m7hEZ-00030e-V0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 18:44:11 +0200 Original-Received: from localhost ([::1]:49388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7hEZ-0000Ef-0e for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 12:44:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7hEQ-0000E8-7A for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 12:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7hEP-00009t-W6 for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 12:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7hEP-0000td-UW for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 12:44:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Howard Melman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jul 2021 16:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30978 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo wontfix X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16272314223413 (code B ref -1); Sun, 25 Jul 2021 16:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jul 2021 16:43:42 +0000 Original-Received: from localhost ([127.0.0.1]:49269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7hE6-0000sz-8K for submit@debbugs.gnu.org; Sun, 25 Jul 2021 12:43:42 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7hE2-0000sp-2t for submit@debbugs.gnu.org; Sun, 25 Jul 2021 12:43:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7hE1-0000CH-Qt for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 12:43:37 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:51334) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7hDz-0008I4-Pt for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 12:43:37 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1m7hDx-0002BY-6y for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 18:43:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:210723 Archived-At: Lars Ingebrigtsen writes: > Phil Sainty writes: > >>> Does anybody else have an opinion here? The suggestion is to make >>> define-minor-mode define a `foo-mode-lighter' variable that users can >>> then change to easily change the lighters. >> >> It sounds like a good change. > > I just can't make up my mind here. On the one hand, a > `foo-mode-lighter' variable would make things easy and regular. On the > other hand, it means creating a new user option for each minor mode > (i.e., a defcustom), and it means having these in `minor-mode-alist', > which means one additional variable lookup (per minor mode) when > creating the mode line. Thanks for considering this. If the performance impact of having these variables in minor-mode-alist is significant, then fine. Otherwise IMHO "easy and regular" clearly outweighs having more defcustoms (which seems better to me anyway, I could use completion to see all the lighter strings). >>> Or do we have a separate mechanism for this somewhere? >> >> We do in GNU ELPA (see https://www.emacswiki.org/emacs/DelightedModes >> regarding the one I wrote, delight.el), but that and similar libraries >> mostly exist because there wasn't something as trivial as a variable >> to set. >> >> Delight also takes care of synchronising the label in `mode-line-menu' >> (down-mouse-3 on `mode-line-modes'), as well as allowing custom names >> for major modes via the same UI -- but providing an easy way to set >> minor mode lighters was the actual reason for writing it. > > It sounds like delight is the right solution here -- it's a more > complete solution, and people who want this can just install your > package... > > So... on the whole... I think we shouldn't add the -lighter > variables. So I'm closing this bug report. I agree that packages like delight, dim and diminish (and I just learned about blackout) mostly exist because there wasn't a "trivial" or "easy and regular" way to do this and don't see how they're "more complete" than the proposal.. If the packages are the way to go, maybe one could be included in emacs? They've been around for several years (diminish since '98). As it stands now, a user that just wants to eliminate something like " ElDoc" or " ws" from their modeline won't find the answer in the documentation. If they look for a package to do this even the package descriptions as they appear in list-packages don't have a common keyword to search for: blackout Better mode lighter overriding delight A dimmer switch for your lighter text dim Change mode-line names of major/minor modes diminish Diminished modes are minor modes with no modeline display So they will have to do an internet search and then evaluate which of 3 or 4 packages they want to use. It's certainly not "easy or regular". -- Howard