From unknown Sun Jun 22 03:56:20 2025 X-Loop: don@donarmstrong.com Subject: bug#1525: prompt string for execute-extended-command not flexible Reply-To: xah lee , 1525@debbugs.gnu.org Resent-From: xah lee Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 09 Dec 2008 22:45:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1525 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12288622234451 (code B ref -1); Tue, 09 Dec 2008 22:45:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.0000 Tokens: new, 34; hammy, 90; neutral, 65; spammy, 1. spammytokens:0.998-1--greeted hammytokens:0.000-+--emacs, 0.000-+--Emacs, 0.000-+--m-x, 0.000-+--Mx, 0.000-+--M-x X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 9 Dec 2008 22:37:03 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB9MaxnJ004444 for ; Tue, 9 Dec 2008 14:37:01 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LABCN-0003kd-DQ for bug-gnu-emacs@gnu.org; Tue, 09 Dec 2008 17:36:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LABCL-0003im-F4 for bug-gnu-emacs@gnu.org; Tue, 09 Dec 2008 17:36:58 -0500 Received: from [199.232.76.173] (port=56757 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LABCL-0003ia-8r for bug-gnu-emacs@gnu.org; Tue, 09 Dec 2008 17:36:57 -0500 Received: from mout.perfora.net ([74.208.4.194]:65362) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LABCL-0008W4-2g for bug-gnu-emacs@gnu.org; Tue, 09 Dec 2008 17:36:57 -0500 Received: from [192.168.1.2] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus0) with ESMTP (Nemesis) id 0MKp8S-1LABC82m4X-0006Om; Tue, 09 Dec 2008 17:36:46 -0500 Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: quoted-printable Message-Id: Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed To: bug-gnu-emacs@gnu.org From: xah lee Date: Tue, 9 Dec 2008 14:36:36 -0800 X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX19k9Mp0RUNH/Q6XtE6ucb46Hh22LDWEcYMg+3y 8WuZUV30+ROQR+IxtBx3XJF58S8r4p+lct0PPHxKM62DDObhbd V4yArpWjU46Kk8mXkZpBg== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. The prompt string for execute-extended-command is =E2=80=9CM-x =E2=80=9D, = but that =20 is not correct if the command is bound to some other key by =20 customization. Kevin Rodgers gave this explanation recently in =E2=80=9Cgnu.emacs.help=E2= =80=9D: =C2=AB seber...@spawar.navy.mil wrote: > When you type a command in Emacs you are greeted with the prompt "M- > x". How change that prompt string? Change this code in src/keyboard.c and recompile emacs: /* This isn't strictly correct if execute-extended-command is bound to anything else. Perhaps it should use this_command_keys? */ strcat (buf, "M-x "); --=20 Kevin Rodgers =C2=BB So, possibly the promp can be changed to =E2=80=9CExecute command =E2=80=9D= . Thanks. Xah =E2=88=91 http://xahlee.org/ =E2=98=84= From unknown Sun Jun 22 03:56:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1525: prompt string for execute-extended-command not flexible Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jul 2011 13:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: xah lee Cc: 1525@debbugs.gnu.org Received: via spool by 1525-submit@debbugs.gnu.org id=B1525.131030379610975 (code B ref 1525); Sun, 10 Jul 2011 13:17:01 +0000 Received: (at 1525) by debbugs.gnu.org; 10 Jul 2011 13:16:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QftsB-0002qx-PP for submit@debbugs.gnu.org; Sun, 10 Jul 2011 09:16:36 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfts9-0002qm-8z for 1525@debbugs.gnu.org; Sun, 10 Jul 2011 09:16:34 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Qftrx-0000Ep-NG; Sun, 10 Jul 2011 15:16:21 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: (xah lee's message of "Tue, 9 Dec 2008 14:36:36 -0800") Date: Sun, 10 Jul 2011 15:15:51 +0200 Message-ID: References: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: The Human League's _Credo_: "Sky" X-Hashcash: 1:23:110710:xah@xahlee.org::kwaNCw17JhLMzaSR:000A3ZQ X-Hashcash: 1:23:110710:1525@debbugs.gnu.org::lK4adp1Fsgpu8Zbz:00000000000000000000000000000000000000000LJ/7 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1Qftrx-0000Ep-NG X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1310908581.79689@vAooft53ubbAXYhdCeIzIw X-Spam-Status: No X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) xah lee writes: > The prompt string for execute-extended-command is =93M-x =94, but that is > not correct if the command is bound to some other key by > customization. > > Kevin Rodgers gave this explanation recently in =93gnu.emacs.help=94: > > =AB > seber...@spawar.navy.mil wrote: >> When you type a command in Emacs you are greeted with the prompt "M- >> x". How change that prompt string? > > Change this code in src/keyboard.c and recompile emacs: > /* This isn't strictly correct if execute-extended-command > is bound to anything else. Perhaps it should use > this_command_keys? */ > strcat (buf, "M-x "); This is no longer done, but it's still not quite right. If you do: (local-set-key [(meta z)] 'execute-extended-command) Then you still get "M-x" as the prompt if you do `M-z'. The reason is that it looks up the command first, and then picks one of the bindings as the description, with code that's kinda like this: (key-description (car (where-is-internal 'execute-extended-command))) Is there any reason it doesn't just use this_command_keys which presumably would be more correct? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Sun Jun 22 03:56:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1525: prompt string for execute-extended-command not flexible Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2011 03:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Magne Ingebrigtsen Cc: xah lee , 1525@debbugs.gnu.org Received: via spool by 1525-submit@debbugs.gnu.org id=B1525.13104408434218 (code B ref 1525); Tue, 12 Jul 2011 03:21:01 +0000 Received: (at 1525) by debbugs.gnu.org; 12 Jul 2011 03:20:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgTWc-00015z-MV for submit@debbugs.gnu.org; Mon, 11 Jul 2011 23:20:42 -0400 Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgTWc-00015o-16 for 1525@debbugs.gnu.org; Mon, 11 Jul 2011 23:20:42 -0400 Received: from furball (dhcp128036225145.central.yale.edu [128.36.225.145]) (authenticated bits=0) by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id p6C3KalJ023117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 11 Jul 2011 23:20:36 -0400 From: Chong Yidong References: Date: Mon, 11 Jul 2011 23:20:35 -0400 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 10 Jul 2011 15:15:51 +0200") Message-ID: <87aackb2ws.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147 X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Lars Magne Ingebrigtsen writes: > (local-set-key [(meta z)] 'execute-extended-command) > > Then you still get "M-x" as the prompt if you do `M-z'. > > The reason is that it looks up the command first, and then picks one of > the bindings as the description, with code that's kinda like this: > > (key-description (car (where-is-internal 'execute-extended-command))) > > Is there any reason it doesn't just use this_command_keys which > presumably would be more correct? OTOH, you might get into a tricky situation if execute-extended-command was launched by, say, a mouse event. From unknown Sun Jun 22 03:56:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1525: prompt string for execute-extended-command not flexible Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2011 03:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Magne Ingebrigtsen Cc: xah lee , 1525@debbugs.gnu.org Received: via spool by 1525-submit@debbugs.gnu.org id=B1525.13104421289304 (code B ref 1525); Tue, 12 Jul 2011 03:43:01 +0000 Received: (at 1525) by debbugs.gnu.org; 12 Jul 2011 03:42:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgTrL-0002Q1-0q for submit@debbugs.gnu.org; Mon, 11 Jul 2011 23:42:07 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgTrJ-0002PZ-Rr for 1525@debbugs.gnu.org; Mon, 11 Jul 2011 23:42:06 -0400 Received: from cpe-66-108-39-217.nyc.res.rr.com ([66.108.39.217]:48341 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QgTrE-00051a-75; Mon, 11 Jul 2011 23:42:00 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 11946660D5; Mon, 11 Jul 2011 23:41:59 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Mon, 11 Jul 2011 23:41:59 -0400 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 10 Jul 2011 15:15:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > (key-description (car (where-is-internal 'execute-extended-command))) > Is there any reason it doesn't just use this_command_keys which > presumably would be more correct? Actually the problem is that it should never have said "M-x " but rather "Run command: ". From this viewpoint, there's no need to use this_command_keys: "M-x" is really only meant to be "the canonical key-binding for this command", so (key-description (car (where-is-internal 'execute-extended-command))) works as well. Otherwise if someone happens to hit the "menu" key without realizing that it's bound to execute-extended-command he might start wonder "OK the menu bar says 'menu ' what do I do now?", whereas presumably with "M-x " the user sees "oh that runs the same command as M-x, cool". Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 04:51:32 2011 Received: (at control) by debbugs.gnu.org; 12 Jul 2011 08:51:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgYgm-0001of-4A for submit@debbugs.gnu.org; Tue, 12 Jul 2011 04:51:32 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgYgj-0001oR-Sa for control@debbugs.gnu.org; Tue, 12 Jul 2011 04:51:30 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QgYgZ-0001oL-71 for control@debbugs.gnu.org; Tue, 12 Jul 2011 10:51:19 +0200 Date: Tue, 12 Jul 2011 10:51:18 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #1525 X-MailScanner-ID: 1QgYgZ-0001oL-71 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311065479.33966@p54sBVTilFNLH5ne1BBEFA X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) tags 1525 notabug close 1525 From unknown Sun Jun 22 03:56:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1525: prompt string for execute-extended-command not flexible Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2011 08:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Stefan Monnier Cc: xah lee , 1525@debbugs.gnu.org Received: via spool by 1525-submit@debbugs.gnu.org id=B1525.13104607367102 (code B ref 1525); Tue, 12 Jul 2011 08:53:01 +0000 Received: (at 1525) by debbugs.gnu.org; 12 Jul 2011 08:52:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgYhS-0001qV-Sw for submit@debbugs.gnu.org; Tue, 12 Jul 2011 04:52:15 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgYhQ-0001qH-RB for 1525@debbugs.gnu.org; Tue, 12 Jul 2011 04:52:13 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QgYhB-0001pX-V9; Tue, 12 Jul 2011 10:51:57 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: (Stefan Monnier's message of "Mon, 11 Jul 2011 23:41:59 -0400") Date: Tue, 12 Jul 2011 10:51:15 +0200 Message-ID: References: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Japan's _Gentlemen Take Polaroids_: "Nightporter" X-Hashcash: 1:23:110712:1525@debbugs.gnu.org::Jq3yPvlU9F6hDcbs:00000000000000000000000000000000000000000FiVF X-Hashcash: 1:23:110712:xah@xahlee.org::DKqzerDWTcSV45ZL:000XSct X-Hashcash: 1:23:110712:monnier@iro.umontreal.ca::IXVUpqdnTbWs87iO:0000000000000000000000000000000000000hNBN MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1QgYhB-0001pX-V9 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311065518.15944@aZvyM+AsG82KaLLb2BTa+Q X-Spam-Status: No X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Stefan Monnier writes: > Actually the problem is that it should never have said "M-x " but rather > "Run command: ". From this viewpoint, there's no need to use > this_command_keys: "M-x" is really only meant to be "the canonical > key-binding for this command", so (key-description (car > (where-is-internal 'execute-extended-command))) works as well. > Otherwise if someone happens to hit the "menu" key without realizing > that it's bound to execute-extended-command he might start wonder "OK > the menu bar says 'menu ' what do I do now?", whereas presumably with > "M-x " the user sees "oh that runs the same command as M-x, cool". Right. So I'm closing this report, since this isn't really a bug. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/