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: Sun, 09 May 2021 10:57:07 -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="22001"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 48153-done@debbugs.gnu.org, Gregory Heytings , Eli Zaretskii To: Jimmy Yuen Ho Wong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 09 16:58:15 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 1lfkso-0005b7-Kt for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 May 2021 16:58:14 +0200 Original-Received: from localhost ([::1]:45792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfksn-0006vk-NM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 May 2021 10:58:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfksc-0006vT-Kf for bug-gnu-emacs@gnu.org; Sun, 09 May 2021 10:58:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44189) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lfksc-0004pc-DB for bug-gnu-emacs@gnu.org; Sun, 09 May 2021 10:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lfksc-0000Pp-Cz for bug-gnu-emacs@gnu.org; Sun, 09 May 2021 10:58:02 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 May 2021 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48153 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Mail-Followup-To: 48153@debbugs.gnu.org, monnier@iro.umontreal.ca, wyuenho@gmail.com Original-Received: via spool by 48153-done@debbugs.gnu.org id=D48153.16205722411570 (code D ref 48153); Sun, 09 May 2021 14:58:02 +0000 Original-Received: (at 48153-done) by debbugs.gnu.org; 9 May 2021 14:57:21 +0000 Original-Received: from localhost ([127.0.0.1]:55731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfkrw-0000PG-ST for submit@debbugs.gnu.org; Sun, 09 May 2021 10:57:21 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:1350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfkrs-0000P8-9z for 48153-done@debbugs.gnu.org; Sun, 09 May 2021 10:57:20 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A4A924408FA; Sun, 9 May 2021 10:57:10 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D773E44082C; Sun, 9 May 2021 10:57:08 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1620572228; bh=71Pc3JUXUCgTFjEihDDEq/wR0qEeEKTjnJitoJfJ5j4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=A4bQCSIu0nvwcwP40/2K50VZMhV4BOlHV7JZn4utqSXyFE8NgZepq13BE0vShqB5d 6O33eh8ZtxUgDlqQmPCy1nf1saS0DAADViY1sWHW7kw0LdCByIaCQl1j+qepkk1+Nr PYvpUaApLRzNRhR6uIbpMnMNVC2S/NnxOnSfSuEDCkgSPC/xAXAacoWZFy5eb5vIJ8 P3XcndimaSrSjVqJo0+dnH12ZSl+K3/3uPG7x1wHAtoOcs/j96f64ffa4X1WlAK5Lf Q6qG0DMYJaWAiG+WquiJHG4TaHx8SzHJQok2X6m1AzUYM2/aYEBDrPyNM2Uo4VVp41 Q/cdJD/JNofxw== Original-Received: from alfajor (76-10-140-76.dsl.teksavvy.com [76.10.140.76]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9B2F3120445; Sun, 9 May 2021 10:57:08 -0400 (EDT) In-Reply-To: (Jimmy Yuen Ho Wong's message of "Thu, 6 May 2021 11:55:25 +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:206079 Archived-At: > Ok I think I've found a solution to my problem. There are a couple of > things that I didn't understand and had to attach a function to print > out which one is being called on 5 different hooks to find out the > invocation order. > > This is call order I've found: > > 1. ido-setup-hook > 2. minibuffer-mode-hook > 3. minibuffer-setup-hook > 4. minibuffer-exit-hook > 5. minibuffer-inactive-mode-hook > > Specifically, the override keymaps are cleared between step 1 and 2, > so if I loop thru the minibuffers in step 1 to assign to > minor-mode-override-map-alist inside them, they will be reset in step > 2 I suppose. Indeed, `ido-setup-hook` is run after IDO has configured its own keymaps and variables, but hasn't yet entered the minibuffer, so it's too early to work on `minor-mode-override-map-alist`. > So if I needed to "unshadow" the shadowed keybindings inside the > minibuffer, I had to do these processing in minibuffer-setup-hook > because that is called every time the minibuffer is entered. That's right. > Thanks for your help, you can close this issue now. Closing, thanks, Stefan