From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Searching for commands by any part of command name Date: Thu, 8 Apr 2010 06:38:46 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1270734102 9291 80.91.229.12 (8 Apr 2010 13:41:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Apr 2010 13:41:42 +0000 (UTC) To: , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 08 15:41:40 2010 Return-path: Envelope-to: geh-help-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 1NzrzH-0007qo-Oc for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Apr 2010 15:41:40 +0200 Original-Received: from localhost ([127.0.0.1]:57714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzrzH-0006KC-4E for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Apr 2010 09:41:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nzrxz-0006F1-Gk for help-gnu-emacs@gnu.org; Thu, 08 Apr 2010 09:40:19 -0400 Original-Received: from [140.186.70.92] (port=46228 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nzrxy-0006EL-1F for help-gnu-emacs@gnu.org; Thu, 08 Apr 2010 09:40:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nzrxw-0006P3-4W for help-gnu-emacs@gnu.org; Thu, 08 Apr 2010 09:40:17 -0400 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:21157) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzrxv-0006Nc-Tt for help-gnu-emacs@gnu.org; Thu, 08 Apr 2010 09:40:16 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o38De43u021430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Apr 2010 13:40:05 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o38C5IPl012193; Thu, 8 Apr 2010 13:40:03 GMT Original-Received: from abhmt019.oracle.com by acsmt353.oracle.com with ESMTP id 157754331270733927; Thu, 08 Apr 2010 06:38:47 -0700 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 08 Apr 2010 06:38:46 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcrW2KfNDwViGTNCQvGGe3d2fqEDvwARdpOQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4BBDDCB4.000C:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72629 Archived-At: > Emacs command names can be confusing to newcomers and casual users, > partly because of the word order in command names, and partly because > users don't know how to specify the action (which begins the command > name). For example, to close a window, you delete it. I think it > would be easier if it was possible to search commands > case-insensitively and by text anywhere in the name, rather than only > the beginning. For example, if a user types > > M-x window > > then Emacs would list commands including: > > balance-windows > buffer-menu-other-window > clone-indirect-buffer-other-window > compare-windows > delete-other-windows > delete-window > > Can Emacs be customized or modified to do that? Several 3rd-party packages allow this, and the latest Emacs vanilla version allows it out of the box to some extent. Here is one such package (which I maintain): http://www.emacswiki.org/emacs/EmacsNewbieWithIcicles To match against a substring (which is what you describe), use `S-TAB' for completion instead of `TAB'. By default, `S-TAB' matching is actually regexp (regular expression) matching, but if you want just substring matching (i.e. you want to match regexp special chars literally), then just use `C-`' (once) in the minibuffer - or just customize option `icicle-regexp-quote-flag' to non-nil. Icicles completion works this way not just for command names but everything else as well. And you can match multiple substrings without regard to order, so you can match not only `window' but also `buffer', and thus pick up candidates like `window-buffer' and `get-buffer-window' for `C-h f'. You do that by separating the different match patterns with `S-SPC', so: `C-h f window S-SPC buffer S-TAB'. Other packages that also match substrings, and more info about completion in general, are available here: http://www.emacswiki.org/emacs/CategoryCompletion