From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#48153: 28.0.50; minor mode keymaps should not override keymap given to read-from-minibuffer Date: Wed, 05 May 2021 10:17:58 -0400 Message-ID: References: <1a73bd6c69bb5c6a8431@heytings.org> <1a73bd6c69374497d37b@heytings.org> <1a73bd6c69101f3312ad@heytings.org> <1a73bd6c691b937c82fc@heytings.org> <70f2eadd5f48937bb057@heytings.org> <83r1il2x7t.fsf@gnu.org> <70f2eadd5fbd139e3c62@heytings.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11105"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Gregory Heytings , 48153@debbugs.gnu.org, Eli Zaretskii To: Jimmy Yuen Ho Wong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 05 16:19:19 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 1leIMw-0002ip-2H for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 May 2021 16:19:18 +0200 Original-Received: from localhost ([::1]:44686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leIMv-0001b6-3k for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 May 2021 10:19:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leIMh-0001aG-TV for bug-gnu-emacs@gnu.org; Wed, 05 May 2021 10:19:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1leIMg-0000sa-KZ for bug-gnu-emacs@gnu.org; Wed, 05 May 2021 10:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1leIMg-0004II-FA for bug-gnu-emacs@gnu.org; Wed, 05 May 2021 10:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 May 2021 14:19:02 +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.162022429116499 (code B ref 48153); Wed, 05 May 2021 14:19:02 +0000 Original-Received: (at 48153) by debbugs.gnu.org; 5 May 2021 14:18:11 +0000 Original-Received: from localhost ([127.0.0.1]:60538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1leILr-0004I3-Cs for submit@debbugs.gnu.org; Wed, 05 May 2021 10:18:11 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1leILm-0004Hd-TP for 48153@debbugs.gnu.org; Wed, 05 May 2021 10:18:09 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5105480695; Wed, 5 May 2021 10:18:01 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 632F1807A1; Wed, 5 May 2021 10:17:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1620224279; bh=fjciGCTIFNiOqTH1HM0Z30SILT9iY12X5BUq3WhhglQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mFjzKD6oeN9C6AZQVR4enuVR5qTZGqFtZe/8wva98wMPQQsj9SUSpuWFF7zj8joCp j7r5wMLf+YtGBdeJEsNMysg46Kv6Ok+uAGQPjKlG+YO94QOF+mUy0K/xd0RzYL7tFF 0OZOjNHRocnyhoSSA8AIvFq9UIKHG8dMePheRVXM5vW+ZYeL98cK32TrCMpN7HyZ/P nZRgpgdZrKwF/gtziBx9lTyqNQahaLkM5cjq1a9qK3Y5rbwgaHNcy+D2V9Q43T12yP q59Cr6lVFbZmTad2Wz/1V9JWKJdpadH2V+LfoRafkzg16ScR2QzrKtRTjoYtx20kle XwpurQhFrE82A== Original-Received: from alfajor (76-10-140-76.dsl.teksavvy.com [76.10.140.76]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id F3E401209CF; Wed, 5 May 2021 10:17:58 -0400 (EDT) In-Reply-To: (Jimmy Yuen Ho Wong's message of "Wed, 5 May 2021 14:24:22 +0100") 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:205702 Archived-At: > 1. On emacs 27, minor mode keybindings will only override the key > bindings given to read-from-minibuffer after the second invocation of > the minibuffer, but doesn't on the first invocation. Something like that, yes. That's only for minor modes defined via `define-globalized-minor-mode`. Not for global minor modes defined in the usual way via (define-minor-mode ... :global t ...). This change makes for a more predictable behavior and is a side-effect of the change described in etc/NEWS as: ** An active minibuffer now has major mode 'minibuffer-mode', not the erroneous 'minibuffer-inactive-mode' it formerly had. More specifically, the difference is that in Emacs<28 sometimes those globalized minor modes where not enabled (hence their keybindings are not active). > 2. On emacs 28, minor mode keybindings override the key bindings given > to read-from-minibuffer at all times. And this was also true in all previous versions of Emacs. > 3. But, `minor-mode-overriding-map-alist` does not override the > override in effect in the minibuffer like other buffers. That's the part of your bug report I haven't understood yet. > My expectation is when a keymap is explicitly given to > read-from-minibuffer, the key bindings in it should take precedence, > but it doesn't. No, this keymap is the "local map" a.k.a "major mode map", so it has lower precedence than minor keymaps. Always had. > As you can see from the snippet from my last email, both > ido-completion-map and test-mode bind to C-k, I expect the C-k binding > in ido-completion-map to take effect inside the minibuffer, without > being overridden by any minor modes in effect inside the minibuffer. This expectation is incorrect ;-) > If this is not to be desired, I'd expect setting > minor-mode-overriding-map-alist or the usual key binding lookup search > algorithm to work inside the minibuffer. This should be the case: minibuffers are treated exactly like all other buffers by the keymap code, AFAIK. Stefan