From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#29399: 26.0.90; `edit-kbd-macro' has bad prompt Date: Wed, 22 Nov 2017 17:15:53 -0800 (PST) Message-ID: References: <4fea6ba6-0003-4422-97d6-51098197b1eb@default> <87y3mxzwb1.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1511399834 30983 195.159.176.226 (23 Nov 2017 01:17:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Nov 2017 01:17:14 +0000 (UTC) Cc: 29399@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 23 02:17:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHg8X-0007QM-8x for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Nov 2017 02:17:05 +0100 Original-Received: from localhost ([::1]:41977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHg8e-0002Pn-46 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Nov 2017 20:17:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHg8X-0002Pg-Ov for bug-gnu-emacs@gnu.org; Wed, 22 Nov 2017 20:17:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHg8U-0007mO-IP for bug-gnu-emacs@gnu.org; Wed, 22 Nov 2017 20:17:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44550) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHg8U-0007m8-ET for bug-gnu-emacs@gnu.org; Wed, 22 Nov 2017 20:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eHg8U-0006qJ-1l for bug-gnu-emacs@gnu.org; Wed, 22 Nov 2017 20:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Nov 2017 01:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29399 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29399-submit@debbugs.gnu.org id=B29399.151139976626233 (code B ref 29399); Thu, 23 Nov 2017 01:17:01 +0000 Original-Received: (at 29399) by debbugs.gnu.org; 23 Nov 2017 01:16:06 +0000 Original-Received: from localhost ([127.0.0.1]:53231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHg7a-0006p3-GR for submit@debbugs.gnu.org; Wed, 22 Nov 2017 20:16:06 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:49196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHg7Y-0006oI-T1 for 29399@debbugs.gnu.org; Wed, 22 Nov 2017 20:16:05 -0500 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vAN1Fvxl008896 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Nov 2017 01:15:57 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vAN1FtLj021537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Nov 2017 01:15:55 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vAN1FsZ5008820; Thu, 23 Nov 2017 01:15:55 GMT In-Reply-To: <87y3mxzwb1.fsf@users.sourceforge.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4615.0 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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" Xref: news.gmane.org gmane.emacs.bugs:140259 Archived-At: > > It should use \\[execute-extended-command] and thus say: > > "Keyboard macro to edit (C-x e, C-o, C-h l, or keys):" >=20 > I'm not sure if this would help so much for the OP's case [1], which is > more like: >=20 > (defun my/execute-extended-command () ; actually `smex'[2] in OP's > case > (interactive) > (call-interactively 'execute-extended-command)) > (global-set-key (kbd "M-x") 'my/execute-extended-command) >=20 > With that kind of config, I get > Keyboard macro to edit (C-x e, , C-h l, or keys): Well, that's at least correct. ;-) The problem is that there is no way to tell Emacs which binding to show. I suppose you could use `set-advertised-calling-convention', but a user shouldn't need to bother (or know about) that, here. This is a general Emacs gotcha/problem. It's not the problem of this bug report. Except for this, which I also said: >> This prompt is anyway not clear. The command should >> instead accept a key sequence that shows more complete >> info/help, and the prompt should just mention that key >> sequence. That's the right thing to do. The prompt shouldn't try to mention lots of keys. That's only good when the command itself will actually read keys - it then knows just which keys to mention: those it uses. This command should mention only (at most) a help key that it provides (would provide). Using that help key (at that time - while prompted) would show whatever help we want to show, including mentioning any keys or commands, if appropriate. Of course that help could itself fall into the problem of showing a key such as `' or `'. But as I said, that's a general problem. It could choose to mention only command names, i.e., not use \\[...]. > I have no idea how to produce on my keyboard. You probably cannot. > Which ends up with this: >=20 > "Keyboard macro to edit (C-x e, M-x execute-extended-command, C-h l, > or keys):" And that's as good as it could get. The command can reasonably assume that you can use `execute-extended-command' (which you can, I think, regardless of whether `M-x' is bound to `smex'). The command cannot know that a user always wants to use `smex' instead of `M-x'. UNLESS the user (or `smex-mode' or whatever) actually substitutes `smex' for `execute-extended-command' keys, using remapping or using `substitute-key-definition'.