From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Menu commands to M-x history? Date: Sun, 26 Jul 2009 18:47:58 -0700 Message-ID: References: <87skgqu2ce.fsf@olgas.newt.com> <7432.1248236149@olgas.newt.com> <7dbe73ed0907221134o1a1fe024k353b1a9a61482041@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1248659288 11299 80.91.229.12 (27 Jul 2009 01:48:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jul 2009 01:48:08 +0000 (UTC) Cc: rms@gnu.org To: "'Mathias Dahl'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 27 03:48:01 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MVFJo-0005mv-Ax for ged-emacs-devel@m.gmane.org; Mon, 27 Jul 2009 03:48:00 +0200 Original-Received: from localhost ([127.0.0.1]:55061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVFJn-0002MK-PH for ged-emacs-devel@m.gmane.org; Sun, 26 Jul 2009 21:47:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVFJi-0002MF-Ib for emacs-devel@gnu.org; Sun, 26 Jul 2009 21:47:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVFJd-0002M3-4q for emacs-devel@gnu.org; Sun, 26 Jul 2009 21:47:53 -0400 Original-Received: from [199.232.76.173] (port=39802 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVFJc-0002M0-Vu for emacs-devel@gnu.org; Sun, 26 Jul 2009 21:47:49 -0400 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:27537 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MVFJa-0007xB-8t; Sun, 26 Jul 2009 21:47:46 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6R1lGev006220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Jul 2009 01:47:18 GMT Original-Received: from abhmt001.oracle.com (abhmt001.oracle.com [141.146.116.10]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6R1lfWv030134; Mon, 27 Jul 2009 01:47:42 GMT Original-Received: from dradamslap1 (/141.144.232.119) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 26 Jul 2009 18:47:40 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <7dbe73ed0907221134o1a1fe024k353b1a9a61482041@mail.gmail.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcoK/ALjAtWvhYYFQtGRD7PnSkZoBgDQ4M2Q X-Source-IP: abhmt001.oracle.com [141.146.116.10] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010208.4A6D073D.013B:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113187 Archived-At: > > Perhaps a better way of learning what command is on a button or menu > > item is to use help such as `M-x help RET k RET'. > > I think that is enough too. I agree: `C-h k' or a tooltip is sufficient to show the command associated with a menu item or button. However, it can also be convenient to be able to complete against commands that were previously executed using a menu. You might want to do this some of the time (but probably not by default). FWIW, this feature is available in Icicles in the following way: 1. Each command executed by `call-interactively' is added to a larger history list, `icicle-interactive-history'. The normal history for commands, `extended-command-history', is treated just as before: commands are added to it only via `M-x'. 2. If you use `C-M-pause' during completion of a command name, your input is completed against the larger history, `icicle-interactive-history'. You can thus complete your input to the command that is behind a previously used menu item. 3. If you use `C-M-pause' during any other completion (or if you use it with a prefix arg during command completion), then you can choose an alternative history to use for the current completion. You can then use the usual ways of accessing history entries. 4. If after #3 you use `M-h', you can complete your input against the alternative history you chose. (`M-h' always completes against the current history, in Icicles.) > At first I kind of liked Lennart's idea. For example, sometimes I have > used the Edit -> Text Properties -> Foreground Color command and have > been wondering how to do the same from the keyboard (is it possible?) > but I think I would be annoyed having my precious M-x history filled > with things I did not expect. That's why Icicles uses a separate history that includes everything executed by `call-interactively' (which includes menu items). And it's why you use this larger history only on demand (via `C-M-pause'). > Quite often I execute the same M-x > command over and over again, doing something else in between, and if > what I did in between included executing some menu commands I might be > annoyed to have to step back some extra steps in order to get at the > command I want to run. Yes. Use the larger history only when you want to. 5. Of course, when you complete against a command previously accessed using a menu, you need to be able to recognize the command name, which is sometimes quite different from the menu-item name. Icicles helps here by showing the associated command name (in the *Completions* mode line) whenever you cycle to a menu item during completion. For example, library La Carte completes menu items, and Icicles shows the command for the current item during cycling. (Unlike tmm-menubar, La Carte completes absolute menu items (paths) - similar to file-name completion). 6. If you use `M-h' during La Carte's menu-item completion, you complete against all commands previously entered interactively, including those accessed by menu (via keyboard or otherwise).