From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "47150@debbugs.gnu.org" <47150@debbugs.gnu.org>,
Sheng Yang <styang@fastmail.com>
Subject: bug#47150: [External] : bug#47150: 28.0.50; Incorrect major-mode in minibuffer
Date: Mon, 12 Apr 2021 18:34:34 +0000 [thread overview]
Message-ID: <YHSSug388+A3i0OP@ACM> (raw)
In-Reply-To: <jwvh7kbcu3a.fsf-monnier+emacs@gnu.org>
Hello, Stefan.
On Mon, Apr 12, 2021 at 13:10:57 -0400, Stefan Monnier wrote:
> > Why? Until very recently (? 2 months ago), minibuffer-inactive-mode
> > served for both active and inactive MBs.
> No: it was *activated* every time the minibuffer became inactive (and
> not when the minibuffer was becoming active), and its keymap was only
> active when the minibuffer was inactive.
OK, what you say is true, what I said above is also true - active
minibuffers ran in minibuffer-inactive-mode (apart from the first
invocation of a MB), getting their key maps from the calling Lisp
commands. At the end of the MB action m-inactive-m was called.
> The keymap and the hook are the main two features of
> `minibuffer-inactive-mode`.
Yes. Possibly they're the only features.
Am I right in thinking that your main worry is the hook not getting
called at the end of every MB action?
> > The idea here is to avoid the proliferation of unneeded major modes.
> Major modes are cheap. There is no problem with proliferation.
That's not true - the OP has found a problem, in that some minor modes
switch themselves on when (memq major-mode foo-mode-list). The current
situation, fundamental-mode (active), minibuffer-inactive-mode
(inactive) is causing problems with that scheme, hence this bug.
> > We don't seem to need two distinct modes here for the minibuffer.
> The two situations are very different, where the users expect very
> different behavior.
They are indeed very different, but that difference is entirely
accounted for by the key map (and optionally, the mode hook).
> > This is pretty much, but not quite, the same as how things were up until
> > recently.
> No, it's completely different: the difference may seem minor, but
> this minor reason is the raison d'être of `minibuffer-inactive-mode`, so
> what you're suggesting is, in practice, the removal of
> `minibuffer-inactive-mode`.
I don't think that's right. What I'm proposing is renaming it (with
temporary alias), and regularising what used to be an ugly situation.
How about having just minibuffer-mode, and calling it at the end of
every MB action (as was previously done with minibuffer-inactive-mode),
but not at the start of a MB action? This will call the mode hook at
the same times as the m-inactive-m-hook used to be called, and reset the
MB's keymap to the inactive map at the same time.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2021-04-12 18:34 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 0:57 bug#47150: 28.0.50; Incorrect major-mode in minibuffer styang
2021-03-15 1:02 ` bug#47150: Emacs bug#47150 " Sheng Yang
2021-03-15 7:59 ` bug#47150: " Alan Mackenzie
2021-03-15 18:15 ` Sheng Yang
2021-03-15 21:30 ` Alan Mackenzie
2021-03-15 21:58 ` Sheng Yang
2021-03-22 15:12 ` Alan Mackenzie
2021-03-22 15:52 ` bug#47150: [External] : " Drew Adams
2021-03-22 16:27 ` Alan Mackenzie
2021-03-22 17:09 ` Drew Adams
[not found] ` <878s6ft5ze.fsf_-_@miha-pc>
2021-03-22 18:38 ` bug#47150: [External] : " Drew Adams
2021-03-22 21:57 ` bug#47150: [External] : " Alan Mackenzie
2021-03-22 23:06 ` Drew Adams
2021-03-23 13:05 ` Alan Mackenzie
2021-03-23 15:44 ` Drew Adams
2021-03-22 18:12 ` Stefan Monnier
2021-03-22 18:08 ` Stefan Monnier
2021-03-22 18:40 ` bug#47150: [External] : " Drew Adams
2021-03-22 19:30 ` Stefan Monnier
2021-03-22 19:42 ` Drew Adams
2021-03-22 20:11 ` Stefan Monnier
2021-03-22 21:36 ` Drew Adams
2021-04-09 8:57 ` Sheng Yang
2021-04-12 10:18 ` Alan Mackenzie
2021-04-12 12:02 ` Sheng Yang
2021-04-12 14:01 ` Stefan Monnier
2021-04-12 16:15 ` Alan Mackenzie
2021-04-12 17:10 ` Stefan Monnier
2021-04-12 18:34 ` Alan Mackenzie [this message]
2021-04-12 20:46 ` Stefan Monnier
2021-04-18 11:14 ` Alan Mackenzie
2021-04-18 15:22 ` Stefan Monnier
2021-04-19 9:33 ` Alan Mackenzie
2021-04-19 17:30 ` Alan Mackenzie
2021-04-19 18:22 ` Stefan Monnier
2021-04-19 19:18 ` Sheng Yang
2021-04-19 19:35 ` Stefan Monnier
2021-04-19 19:47 ` Sheng Yang
2021-04-19 20:36 ` Stefan Monnier
2021-04-19 20:42 ` Sheng Yang
2021-04-20 10:25 ` Alan Mackenzie
2021-03-22 19:42 ` Alan Mackenzie
2021-03-22 20:03 ` Stefan Monnier
2021-03-22 18:24 ` bug#47150: [External] : " jakanakaevangeli
2021-03-23 7:18 ` bug#47150: [External] : " jakanakaevangeli
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YHSSug388+A3i0OP@ACM \
--to=acm@muc.de \
--cc=47150@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=styang@fastmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.