From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#5364: 23.1.91; execute-extended-command should do like FFAP Date: Mon, 23 Aug 2010 00:32:29 +0100 Organization: JURTA Message-ID: <87wrriw7ea.fsf@mail.jurta.org> References: <87my0hgy29.fsf@jidanni.org> <87ska8jszf.fsf@mail.jurta.org> <87wrzki0zy.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282520369 7493 80.91.229.12 (22 Aug 2010 23:39:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 22 Aug 2010 23:39:29 +0000 (UTC) Cc: 5364-done@debbugs.gnu.org, jidanni@jidanni.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 23 01:39:28 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OnK8N-0002zv-FH for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Aug 2010 01:39:27 +0200 Original-Received: from localhost ([127.0.0.1]:58810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnK8M-0007rl-Iy for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Aug 2010 19:39:26 -0400 Original-Received: from [140.186.70.92] (port=32937 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnK8B-0007qj-8k for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2010 19:39:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnK89-0001Co-Kb for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2010 19:39:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43441) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnK89-0001Ck-Hd for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2010 19:39:13 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OnK39-00082z-E4 for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2010 19:34:03 -0400 Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Aug 2010 23:34:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 5364 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Mail-Followup-To: 5364@debbugs.gnu.org, juri@jurta.org Original-Received: via spool by 5364-done@debbugs.gnu.org id=D5364.128252003830911 (code D ref 5364); Sun, 22 Aug 2010 23:34:03 +0000 Original-Received: (at 5364-done) by debbugs.gnu.org; 22 Aug 2010 23:33:58 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnK33-00082W-0x for submit@debbugs.gnu.org; Sun, 22 Aug 2010 19:33:57 -0400 Original-Received: from [217.41.228.242] (helo=smtp-server1.btopenzone.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnK30-00082N-KE for 5364-done@debbugs.gnu.org; Sun, 22 Aug 2010 19:33:55 -0400 Original-Received: from smtp.btopenzone.com ([10.217.8.10]) by smtp-server1.btopenzone.com (8.11.7p3+Sun/8.12.10) with ESMTP id o7MNZ5F25605; Mon, 23 Aug 2010 00:35:07 +0100 (BST) In-Reply-To: <87wrzki0zy.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 15 Jan 2010 03:12:05 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 22 Aug 2010 19:34:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39709 Archived-At: > This patch moves interactive spec into Elisp and also implements > the following task from comments in execute-extended-command: > > /* This isn't strictly correct if execute-extended-command > is bound to anything else. Perhaps it should use > this_command_keys? */ > > It uses `(key-description (this-single-command-keys))' to do this. Actually, it occured to me that displaying a key other than "M-x" in the prompt of `execute-extended-command' is too confusing. For instance, in bindings.el `execute-extended-command' is bound to the [menu] key. When I accidentally type the key, the first reaction is "What does this mean?!" because it's very strange to see the prompt " " waiting for a command. It looks like a beginning of a key sequence for the main menu. OTOH, a well-known prompt "M-x" means it reads an extended command. I've added a comment that explains why "M-x" is better than anything else. Also we should keep the current function signature of `execute-extended-command' unchanged and not to add a new arg for two reasons: 1. There are places in code that call `execute-extended-command' with one argument. 2. Calling `read-extended-command' to read a command name should not be in the `interactive' spec because it needs to remember the hourglass status before reading a command name (using `hourglass_started'), and restore the hourglass (using `start_hourglass') after that. So I installed a patch that calls `read-extended-command' in the middle of `execute-extended-command'. Of course, moving the whole of `execute-extended-command' to Elisp would be better but the main obstacle is the hourglass functions that have no Elisp interface.