From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jimmy Yuen Ho Wong Newsgroups: gmane.emacs.bugs Subject: bug#48153: 28.0.50; minor mode keymaps should not override keymap given to read-from-minibuffer Date: Tue, 4 May 2021 13:53:10 +0100 Message-ID: References: Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24152"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48153@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 04 14:54:32 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lduZL-0006AW-LZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 14:54:31 +0200 Original-Received: from localhost ([::1]:35810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lduZK-0000nD-ON for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 08:54:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lduYs-0000mo-LE for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 08:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lduYs-0006HL-1L for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 08:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lduYs-0007QF-0U for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 08:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jimmy Yuen Ho Wong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 May 2021 12:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48153 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 48153-submit@debbugs.gnu.org id=B48153.162013280028520 (code B ref 48153); Tue, 04 May 2021 12:54:01 +0000 Original-Received: (at 48153) by debbugs.gnu.org; 4 May 2021 12:53:20 +0000 Original-Received: from localhost ([127.0.0.1]:53032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lduYB-0007Pw-O0 for submit@debbugs.gnu.org; Tue, 04 May 2021 08:53:19 -0400 Original-Received: from mail-wm1-f46.google.com ([209.85.128.46]:46843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lduY9-0007Pp-VQ for 48153@debbugs.gnu.org; Tue, 04 May 2021 08:53:18 -0400 Original-Received: by mail-wm1-f46.google.com with SMTP id k4-20020a7bc4040000b02901331d89fb83so1261516wmi.5 for <48153@debbugs.gnu.org>; Tue, 04 May 2021 05:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=6cVH2R4vzFNcBvtd4HS0pItAPGF8TbevldO9LXi8FuY=; b=IXNZo07B7SUs10bidH8MUJ3TQnD3/YlB+tUzIi5TgJ27LiWMS5p1oyFS97V/VatyIu Kbp6o8UN8FSBla4KoasyjIpYO/v7FW6hQNtn9bFvADmZ0lLgy6yEiHXcbgHEeBldeJdh NgynVIlljP7/+yDRwcOzyhJYmmF3+HacOiTbyIwMoTCpuDeaZSEMyDsCU0T2Rzo5Ro9x pAKetsDKOdKs3kBULHejh7xDBM5IqtuQjKYmsaitrcdIv+QpaVSCFwOZr+jOqEfNroXF xfQpqWVdojnjBDehjHvEoqW4v6KcQ0LLOogkCPyOLq8f4XefjSw/fsxmry/IfMRAilgW a1Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=6cVH2R4vzFNcBvtd4HS0pItAPGF8TbevldO9LXi8FuY=; b=UYDEVqw4iqS90JCqHAjuVIBiWsq6vV7BaXIEFFMx873YgonXIgJgqpEsRqUL0GZhpa 7XqERZWMPJw3KWTSAKQTSdV6PRBM52U73G6/s/2yp6a8VutRrEXnAQ8Z+yi7yakqj4Sz lbgaMMeVImRfQ//rR87kHcC2yu6Y7XtqoC84LNt9K02XSQOppBlmQmM9e8o5nKckd43u ESGFjvsYVgZYpqcFHz0CebqAkDuRYAtCfKCpezpyqM83rbf/Y8USL7/K+g1A2pUn1roI LpO8CY77OqrsRrftKfnT6hSutibchzWgVfsvGzO9CvV+g+7VuaDEJT4Oc1WXvV0ypsN7 5ftA== X-Gm-Message-State: AOAM531V2DLQej3ymWTZhnzv1KUyEGkp5YwbIZa/n+OqyHoZ/vZXQxdy HboZVyHtuRwTSzsBbMCPLrA= X-Google-Smtp-Source: ABdhPJzFd+jw4M3/3KoMT48TOdb4v+Mkrupd6eAdZqBTEcnJnwyGf7dZYByY/Ueldsh+sVKRjmEKkQ== X-Received: by 2002:a05:600c:1991:: with SMTP id t17mr3866867wmq.100.1620132791823; Tue, 04 May 2021 05:53:11 -0700 (PDT) Original-Received: from smtpclient.apple ([137.220.76.130]) by smtp.gmail.com with ESMTPSA id s15sm10681265wrt.19.2021.05.04.05.53.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 05:53:11 -0700 (PDT) In-Reply-To: X-Mailer: iPhone Mail (18E212) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205603 Archived-At: Sorry I missed a reproduction step. You have to turn on the minor mode for t= he minibuffers. In my config there actually is a global minor mode that turn= s the minor mode on even for the minibuffer. In Emacs 27, turning the minor mode on inside the minibuffer would not overr= ide the key map given to read-from-minibuffer. I was able to reproduce this on a pristine init.el with just these reproduct= ion steps plus turning the minor mode on for all buffers with a global minor= mode. My emacs has native compilation configured if that helps. > On 3 May 2021, at 4:15 pm, Gregory Heytings wrote: >=20 > =EF=BB=BF >>=20 >> After typing C-x b or C-x C-f, the minor mode maps from the buffer that l= aunched the minibuffer will override the keymap given to `read-from-minibuff= er`, this seems to be a regression in emacs 28 master. >>=20 >> Reproduction: >>=20 >> 1. Turn on `ido-mode` >> 2. Turn on some minor mode that rebinds `C-k` with `(define-key >> some-minor-mode-map (kbd "C-k") 'some-func)` >> 3. C-x b >> 4. Select a buffer and type C-k >>=20 >> Expectation: >>=20 >> C-k should be bound to `ido-kill-buffer-at-head` and calls it, but instea= d `some-func` is called. >>=20 >> Since C-k is bound in `ido-completion-map`, and it is given to `read-from= -minibuffer`, all the bindings in `ido-completion-map` should take precedenc= e. >>=20 >=20 > Thanks for your bug report. I'm unable to reproduce your recipe on recent= versions of the trunk (today, a week ago). I tried >=20 > (define-minor-mode test-mode "" :keymap (let ((map (make-sparse-keymap))) (= define-key map (kbd "C-k") '(lambda () (interactive) (message "BAD !"))) map= )) >=20 > and C-k is indeed bound to 'ido-kill-buffer-at-head'. I suspect this misb= ehavior is due to your configuration; if not, could you try to create a reci= pe starting with emacs -Q?