unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64048@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	[thread overview]
Message-ID: <87352vs2g5.fsf@localhost> (raw)
In-Reply-To: <835y7rwbmb.fsf@gnu.org>

Eli Zaretskii <eliz@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>





  reply	other threads:[~2023-06-13 17:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 14:33 bug#64048: 30.0.50; global-display-line-numbers-mode has no easy way to set modes where it is enabled Ihor Radchenko
2023-06-13 15:50 ` Eli Zaretskii
2023-06-13 16:09   ` Ihor Radchenko
2023-06-13 16:49     ` Eli Zaretskii
2023-06-13 17:21       ` Ihor Radchenko [this message]
2023-06-13 18:19         ` Eli Zaretskii
2023-06-13 19:36           ` Ihor Radchenko
2023-06-14 11:58             ` Eli Zaretskii
2023-06-14 12:48               ` Ihor Radchenko
2023-06-17  7:46                 ` Eli Zaretskii
2023-06-17 18:30                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-17 18:58                     ` Eli Zaretskii
2023-06-17 19:06                       ` Ihor Radchenko
2023-06-17 19:04                     ` Ihor Radchenko
2023-06-17 19:18                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87352vs2g5.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=64048@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).