GNU bug report logs - #64048
30.0.50; global-display-line-numbers-mode has no easy way to set modes where it is enabled

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Tue, 13 Jun 2023 14:30:03 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64048 <at> debbugs.gnu.org
Subject: bug#64048: 30.0.50; global-display-line-numbers-mode has no easy way to set modes where it is enabled
Date: Tue, 13 Jun 2023 17:21:30 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> May you please elaborate?
>> 
>> IMHO, the only way honouring `global-foo-modes' variable will break
>> someone's setup is when somebody sets `global-foo-modes' (which has no
>> effect now) and expects that there will be no effect in future as well.
>
> I have enough gray hair to know that any such changes break something.
>
> This mode has been with us since Emacs 26, so we cannot make such
> changes after so much time.

May I rephrase is as a feature request then?
Like, please add `global-*-modes' customization for modes defined via `define-globalized-minor-mode'?
Or, at least, add `global-display-line-numbers-modes' customization?

I see not how adding a new feature can break anything here.
If a normal minor mode is made into global, it is a given that it can be
activated independently in arbitrary number of buffers. So, extra
predicate (in addition to the mode's own) should not create any problem.

> ...  Especially since the problem, if there is
> a problem, is minor at best.

I recall multiple occasions when I tried hard to disable a global mode
in some buffers, remembered that there is some special variable for it;
just to find out that a specific global minor mode does not support it.

And then we have non-standard variables like
`dabbrev-ignored-buffer-modes', `hi-lock-exclude-modes',
`which-func-modes' - all with different conventions.

I can also tell you that a question about disabling global minor modes
in some buffers re-surfaces regularly in reddit discussions and IRC.

We even have FAQ entries like https://www.emacswiki.org/emacs/LineNumbers#h5o-10
And the suggested solution is re-defunning "turn-on" function - do we
really want to say that it is the way to go?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 1 year and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.