GNU bug report logs -
#77361
[PATCH] New user option to hide minor mode lighters
Previous Next
Reported by: Pengji Zhang <me <at> pengjiz.com>
Date: Sat, 29 Mar 2025 11:09:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello Pengji!
Pengji Zhang <me <at> pengjiz.com> writes:
> The attached patch adds a new user option to hide some minor mode
> lighters on the mode line (by collapsing them into a menu), which is to
> shorten the mode line and prioritize important information when many
> minor modes are on.
>
> There exist a few packages that solve the problem. To name a few:
>
> - diminish[1] and delight[2]. Both offer a way to change the minor mode
> lighters by modifying 'minor-mode-alist'. To hide a minor mode
> lighter, one may change it to nil.
>
> - minions[3], which partially inspired this patch. It replaces minor
> mode lighters by a menu to toggle all minor modes.
>
> This patch is different from those solutions in two aspects:
>
> - Unlike diminish or delight, one can still see the lighters by clicking
> the button, instead of hiding them permanently. Besides, this patch is
> compatible with those two packages.
>
> - Unlike minions, this patch focuses on *lighters* for *enabled* minor
> modes. The menu contains only lighters, making it a more space
> efficient replacement for lighters on mode line, instead of a way to
> manage minor modes like minions.
>
> So I hope this patch is still useful given the existing similar
> solutions.
>
> Please let me know what you think. Thanks!
This is a good idea. I've used both minions and diminish and it is nice
to have this functionality ootb. I have some concerns however regarding
the frequent mode line recomputation during redisplay. Do you see a
possibility to cache the computed minor mode menu and collapsed lighter?
In any case, the computation should be as efficient as possible. For
profiling I suggest to enable your new user option and then scroll
repeatedly in order to force redisplays and mode line recomputations. If
certain mode line functions appear prominently in the profile they are
candidates for optimization, in order to reduce redisplay latency.
Daniel
This bug report was last modified 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.