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 23:40:41 +0100 Message-ID: References: <1a73bd6c69bb5c6a8431@heytings.org> <1a73bd6c69374497d37b@heytings.org> <1a73bd6c69101f3312ad@heytings.org> <1a73bd6c691b937c82fc@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40696"; 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 Wed May 05 00:42:10 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 1le3k2-000ASI-1l for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 May 2021 00:42:10 +0200 Original-Received: from localhost ([::1]:47914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1le3k0-0006UF-5w for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 18:42:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le3ju-0006Ts-01 for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 18:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44315) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1le3jt-0006vt-PJ for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 18:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1le3jt-00012x-NT for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 18:42:01 -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 22:42: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.16201680864008 (code B ref 48153); Tue, 04 May 2021 22:42:01 +0000 Original-Received: (at 48153) by debbugs.gnu.org; 4 May 2021 22:41:26 +0000 Original-Received: from localhost ([127.0.0.1]:55859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1le3jJ-00012Z-Nt for submit@debbugs.gnu.org; Tue, 04 May 2021 18:41:25 -0400 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:42497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1le3jH-00012T-QS for 48153@debbugs.gnu.org; Tue, 04 May 2021 18:41:25 -0400 Original-Received: by mail-lj1-f175.google.com with SMTP id w4so4511840ljw.9 for <48153@debbugs.gnu.org>; Tue, 04 May 2021 15:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EfpoXvY/HXRWOGP0ATHPUEqst+FSQZpTCeDDiV8s5kY=; b=ZKTmBbkt7SZnK3yQ1pzv0QeIoSqHsgp9CG933dCU8nfQ8WC9k/fEKNzHvwvVzmKgr5 g4xocibtIbNTiDJ5GexobT4B3oLd8fQe+vCs0AVMbxFMdONenWE1XEL3fpoXOwhlovaC x0vzl5vclA5bWqSuaoBgcbO9tUdscIiSfGTXVqPTmMgIZuw5NEEEhLtHHnscBPIUhq3L XaZKIf8amfiKSSOQMEK5VGWRo94E4kAfCOaACJGiT1YKbPxZ1xQ6whmEdIprCOYVC5u9 knLa74mVlf/k7Fe5yNvUO+5H/j/22bAIhM1LieBhPlKq9skZSjfBu8QKmilV0xqBJFWi XlpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EfpoXvY/HXRWOGP0ATHPUEqst+FSQZpTCeDDiV8s5kY=; b=TfySBLWbo9loUNxy77a3zEmpbsDlHcd0AS0p3qkoVbE8PcS2d4tCFJaoJMQ2FsXOOM XqkERNKsT5zzeZ8WFz2i5eGC/+ZsfZFEUIj3HENzIhI2ylgLa1+/tlgALj/a1HBjOU+c EMP7c2JaG/t6iHBcto411ajM6epDmJjeuRLmTkzbkOgkKQIiGrks2DnceY0PPoPKqibP w6SCGlikcZLmS+/kAkpeM9Mdm955jCi33z2HnPk7ZV2xDN8pUzkgunqILIiPq81Fnh7o lXN+fCGTvtpjnX+/+0Miz7g00xKmRFvCS+eUcWCu9Zg9ZWFWBj+Eo1mj7kKOVyeeqb50 yaog== X-Gm-Message-State: AOAM532cufXf8ZQpMfIyKHz+61f4cjpHb6VoUt6o9h3oE057iTEg/LXs 2HtV28ZhyRiflkar6nWfp+DBV9hSyVVmeU9hvmM= X-Google-Smtp-Source: ABdhPJxDLy/5huKC7vJCQEPTaSZTAcEk0s60iuQOcRSZQkA/Mn3TnAb//bRZ5HnEA3xUi/KU3lOkBQSdhFhRTqGz8sc= X-Received: by 2002:a2e:9592:: with SMTP id w18mr7413093ljh.203.1620168077532; Tue, 04 May 2021 15:41:17 -0700 (PDT) In-Reply-To: <1a73bd6c691b937c82fc@heytings.org> 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:205652 Archived-At: 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 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...