Subject: bug#47150: [External] : Re: bug#47150: 28.0.50; Incorrect major-mode in minibuffer

From: Drew Adams <[email-masked]>
Date: Mon, 22 Mar 2021 18:38:54 +0000

> > I see that the doc string for `minibuffer-inactive-mode'
> > suggests that it's not used when the minibuffer is active.
> >
> > And that's effectively the case, though the mode name might
> > not reflect it.  There's _nothing to that mode_, apart from
> > its keymap, and its keymap is not used when the minibuffer
> > is active.  So the mode is there in name only.
> >
> > That's why I expect that your change will have no real
> > effect.  But I'm wary of it - let sleeping dogs lie.  And
> > if it does, in fact, have no real effect, then why make
> > your change?
> 
> There actually is at least one immediate positive effect:
> `C-h m' from an active minibuffer used to claim that the current major
> mode is inactive-minibuffer-mode and confusingly listed its bindings.

Yes, but putting something else there is bound to be
just as misleading, or nearly so.

If what you describe is a real worry then a more
appropriate fix would be:

1. Rename `minibuffer-inactive-mode' (e.g. `minibuffer-mode')

2. Provide a mode description that says clearly:

   a. Minibuffer-reading functions provide the active keymaps.
      And list them, so users can follow their linked names to
      their descriptions.

   b. Explain that when the minibuffer is inactive the keymap
      that's active there is the following...

IOW, why have two modes?  One suffices, I think; it just needs
a better name and description.

And the description for the _active_ case - the keymaps - is
more important - that's what the minibuffer's about.  I doubt
that anyone ever even uses the inactive keymap (but maybe
there's some rare use of it somehow).  [Oops, Stefan just
posted his use of it.  Still - very corner/rare, I think.]

The mode description of the active case can/should say that,
in general (by default), you can carry out _general editing_
on minibuffer contents.  That's not so obvious, IMO.  (And
Emacs should make it more true, by making `?' and `SPC'
self-insert generally.)