From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#23129: 25.1.50; Prefix key is not echoed during minibuffer completion Date: Mon, 28 Mar 2016 09:00:35 -0700 (PDT) Message-ID: <5a83c42d-50c1-4217-b1dd-506814a7ed34@default> References: <> <<83shzay6fd.fsf@gnu.org>> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1459180953 7839 80.91.229.3 (28 Mar 2016 16:02:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2016 16:02:33 +0000 (UTC) Cc: 23129@debbugs.gnu.org To: Eli Zaretskii , Drew Adams , Richard Stallman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 28 18:02:20 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1akZcQ-0003iq-OY for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Mar 2016 18:02:18 +0200 Original-Received: from localhost ([::1]:41615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akZcP-0000rv-HC for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Mar 2016 12:02:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akZbG-0007P3-UR for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2016 12:01:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akZbC-0001sP-Tv for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2016 12:01:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akZbC-0001sK-Qj for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2016 12:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1akZbC-00046U-De for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2016 12:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Mar 2016 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23129-submit@debbugs.gnu.org id=B23129.145918084815748 (code B ref 23129); Mon, 28 Mar 2016 16:01:02 +0000 Original-Received: (at 23129) by debbugs.gnu.org; 28 Mar 2016 16:00:48 +0000 Original-Received: from localhost ([127.0.0.1]:42223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akZay-00045w-Cw for submit@debbugs.gnu.org; Mon, 28 Mar 2016 12:00:48 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:46048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akZaw-00045k-9y for 23129@debbugs.gnu.org; Mon, 28 Mar 2016 12:00:46 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u2SG0dP2018254 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 28 Mar 2016 16:00:40 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u2SG0dWA027013 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 28 Mar 2016 16:00:39 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u2SG0bcf004189; Mon, 28 Mar 2016 16:00:39 GMT In-Reply-To: <<83shzay6fd.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115654 Archived-At: > > 0. emacs -Q > > > > 1. > > (defvar bar-map nil) > > (define-prefix-command 'bar-map) > > (define-key minibuffer-local-must-match-map "\M-i" 'bar-map) > > (define-key bar-map "\M-z" 'foo) > > (defun foo () (interactive) (message "FOOOOOOOOOOO") (sleep-for 2)) > > > > `M-x M-i' > > Wait a second. The prefix key `M-i' is NOT echoed. > > `M-z' > > The message from `foo' is shown. > > > > 2. > > (global-set-key "\M-l" 'bar-map) > > > > `M-l' > > Wait a second. The prefix key `M-l' IS echoed. > > `M-z' > > The message from `foo' is shown. >=20 > Is it really necessary to use this complex setup? Complicated? It is intended to be clear and sufficient. Can you not reproduce the problem using that recipe? If you think the same bug can be repro'd another way, fine. > Does the following simple recipe exhibit the same behavior? > (If not, please tell why not.) >=20 > emacs -Q > C-x C-f C-x >=20 > "C-x C-f" causes the prompt showing the current directory; typing > "C-x" afterwards has no visible effect, whereas you expect it to echo > the usual "C-x-". Right? Is `C-x' a prefix key in `minibuffer-local-filename-completion-map' at that point? Yes, but not directly. So this is not quite the same as what I reported. But if you think it adequate to show the problem, fine. But consider also this: M-x C-( You see the message "C-( is undefined" for a second or so. `minibuffer-message' is presumably used to show this message. This shows Emacs's intention to provide help to users by echoing stuff even when the minibuffer is active. There is nothing odd about this. It is helpful, not harmful. > > BUG: The prefix key `M-i' should be echoed during completion. >=20 > How do you mean "should"? How do I mean "should"? Should. It is helpful for a user (as well as consistent) to echo the prefix keys s?he hits. > AFAICT, this is a deliberate feature: Do you have evidence for that? If so, I'll argue that that is a misfeature (design bug). If not, I'll argue that it is an oversight (implementation bug). I suspect it is an oversight, but I could be wrong. > we only echo the prefix keys when there's nothing in the > minibuffer (more accurately, when the minibuffer level of > recursion is zero). That's the bug. Whether deliberate or by accident, it is not helpful behavior. We echo lots of things when the minibuffer is active. That's what we have `minibuffer-message' for. > I guess this is so to avoid confusing prompts or something > (Richard, can you comment on this?), but in any case this is > how Emacs worked since forever. Yes, I know the bug is longstanding. And as long as we're guessing, I guess it is an oversight. I also know that Emacs itself has so far not bound many keys in minibuffer keymaps. But that has changed in the wider Emacs world. My guess is that vanilla Emacs never even considered the use case of prefix keys bound in minibuffer keymaps. A user hitting a prefix key during minibuffer input has just as much need to see that echoed as s?he does when hitting a prefix key at top-level. I see no reason not to echo it. It is not good interaction for users to see nothing happen when they hit keys, especially if those keys are bound and they do, in fact, have an (unreported) effect. [FWIW, in Icicles I echo prefix arguments (e.g. `C-u', `M-7') used during minibuffer input. And you can apply a prefix arg to individual candidates. Without such echoing, this interaction would be less helpful and more confusing than it needs to be. I haven't seen (or really looked for) a way to echo prefix keys as well, or else I would have done that also.]