Preventing Minor Modes From Appearing On The Mode Line

The Emacs mode line contains a wealth of information, much of which I depend on daily. Some of that information is what the major mode is and what minor modes are active. Again, that’s often useful information. Still, there are plenty of minor modes that I don’t care about, either because they’re always enabled or because they simply don’t matter to my workflow.

For a long time, the standard way of dealing with that was the diminish command that would prevent a given minor mode from appearing on the mode line. The problem was that it sometimes didn’t work and, at least in my experience, every update of a package would reset the diminish function to off for that mode.

Relief is finally—or at least will be—here. Coming in Emacs 31 is mode-line-collapse-minor-modes. The idea is that you will list in a single variable those minor modes you don’t want to appear on the mode line or, optionally, those you do. By default those modes excluded are represented by a single ... on the mode line. You can click on that to see a list of the hidden modes.

As I’ve said before, I usually have two side-by-side windows in a single Emacs frame. That means that there’s not a lot of room on my mode line so getting rid of less important information is essential to me. Diminish has worked reasonably well for that but I’ll be glad to have a simpler way of handling the problem. Emacs 31 is still sometime away but it’s something to look forward to.

This entry was posted in General and tagged . Bookmark the permalink.