unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
To: Gregory Heytings <gregory@heytings.org>
Cc: 48153@debbugs.gnu.org
Subject: bug#48153: 28.0.50; minor mode keymaps should not override keymap given to read-from-minibuffer
Date: Tue, 4 May 2021 23:40:41 +0100	[thread overview]
Message-ID: <CAKDRQS5Dm7c7QwwYUK7VZwUWoFfHgKxc3riyEJ3soVQ6Hf_sNQ@mail.gmail.com> (raw)
In-Reply-To: <1a73bd6c691b937c82fc@heytings.org>

Sorry I'm really bad at giving instructions. Here's some additional information.

First of all, this is the entirety of the test init.el.

(defun bad ()
  (interactive)
  (message "BAD !"))

(define-minor-mode test-mode ""
  :keymap
  (let ((map (make-sparse-keymap)))
    (define-key map (kbd "C-k") 'bad)
    map))

(define-global-minor-mode test-global-mode test-mode (lambda () (test-mode 1)))

(test-global-mode 1)
(ido-mode 1)
(setf enable-recursive-minibuffers 1)

Once emacs has started, C-x b C-h b should show that C-k is bound to `bad`.

Second of all, in order to get the key map bindings to
read-from-minibuffer overridden on emacs 27, it requires quitting from
switch-to-buffer, and then C-x b C-h b again to see that C-k is bound
to `bad`. In other words, on emacs 27, one has to pop up the
minibuffer twice. On emacs 28, just opening the minibuffer the first
time will see the key bindings overridden. I guess this is why I say
this is a regression on emacs 28 but you said you couldn't reproduce
it. I think both versions are wrong, it's just on emacs 28, it's wrong
in a more obvious way. In any case, I'm not sure if the minor mode
maps should override the key bindings in the keymap given to
read-from-buffer.

Jimmy

On Tue, May 4, 2021 at 5:36 PM Gregory Heytings <gregory@heytings.org> wrote:
>
>
> >
> > The minor mode is exactly the same as what you have in your previous
> > email. What actually happens in my regular setup is the key bindings in
> > multiple minor modes override the key map given to read-from-minibuffer.
> > The problem is I don't want to turn off those minor mode as they used to
> > work in the minibuffer in emacs 27 as intended, but not so in emacs 28.
> >
>
> The problem is that, with the test-mode in my previous mail, I cannot
> reproduce the issue.
>
> >
> > One mode is smartparens and another is move-dup.
> >
>
> But neither of these minor modes override C-k, which you mentioned in your
> original bug report?
>
> I tried move-dup, and its four bindings do not override the corresponding
> bindings in the minibuffer, with or without ido-mode.
>
> So I still cannot see the issue you see...





  reply	other threads:[~2021-05-04 22:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02  6:58 bug#48153: 28.0.50; minor mode keymaps should not override keymap given to read-from-minibuffer Jimmy Yuen Ho Wong
2021-05-03 15:15 ` Gregory Heytings
2021-05-04 12:53   ` Jimmy Yuen Ho Wong
2021-05-04 13:13     ` Gregory Heytings
2021-05-04 13:52       ` Jimmy Yuen Ho Wong
2021-05-04 14:02         ` Gregory Heytings
2021-05-04 14:29           ` Gregory Heytings
2021-05-04 16:15             ` Jimmy Yuen Ho Wong
2021-05-04 16:36               ` Gregory Heytings
2021-05-04 22:40                 ` Jimmy Yuen Ho Wong [this message]
2021-05-05  8:09                   ` Gregory Heytings
2021-05-05  9:10                     ` Jimmy Yuen Ho Wong
2021-05-05 12:15                       ` Eli Zaretskii
2021-05-05 13:12                         ` Gregory Heytings
2021-05-05 13:24                           ` Jimmy Yuen Ho Wong
2021-05-05 14:17                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-06 10:55                               ` Jimmy Yuen Ho Wong
2021-05-09 14:57                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-05 13:06                       ` Gregory Heytings
2021-05-05 14:05     ` 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=CAKDRQS5Dm7c7QwwYUK7VZwUWoFfHgKxc3riyEJ3soVQ6Hf_sNQ@mail.gmail.com \
    --to=wyuenho@gmail.com \
    --cc=48153@debbugs.gnu.org \
    --cc=gregory@heytings.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).