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: Abbrevs for the most frequent elisp symbols Date: Mon, 29 Dec 2014 07:28:08 -0800 (PST) Message-ID: <03140087-e244-4b01-b563-cead1ddafaf5@default> References: <87a926puv0.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1419866917 7724 80.91.229.3 (29 Dec 2014 15:28:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2014 15:28:37 +0000 (UTC) To: Marcin Borkowski , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 29 16:28:30 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y5cFB-0003zW-5Q for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Dec 2014 16:28:29 +0100 Original-Received: from localhost ([::1]:33716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5cFA-00072W-HS for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Dec 2014 10:28:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5cEy-00072J-UD for help-gnu-emacs@gnu.org; Mon, 29 Dec 2014 10:28:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y5cEv-000724-9n for help-gnu-emacs@gnu.org; Mon, 29 Dec 2014 10:28:16 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:46082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5cEv-000712-34 for help-gnu-emacs@gnu.org; Mon, 29 Dec 2014 10:28:13 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sBTFSAff032651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Dec 2014 15:28:10 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sBTFS8g6017966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 29 Dec 2014 15:28:09 GMT Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sBTFS8RS017227; Mon, 29 Dec 2014 15:28:08 GMT In-Reply-To: <87a926puv0.fsf@wmi.amu.edu.pl> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101756 Archived-At: > > The idea is trivial, so probably somebody has done something like > > this already, but I thought I'd share it in case someone else > > finds it useful. >=20 > I guess so. I would be quite surprised if Icicles (which I'm slowly > learning to use and appreciate!) couldn't do this. No, Icicles does not do anything for this by default. As Stefan mentioned, for input to `M-x' you already get a kind of command-name abbreviation with vanilla Emacs completion (e.g. partial-completion). The same holds for Icicles. Icicles adds an ability to use custom command abbrevs (but none are defined by default). With this feature you can: . treat command abbrevs the same as command names, for input . define command abbrevs on the fly . define a list of command abbrevs as user option `icicle-command-abbrev-alist' So for example, you could customize `icicle-command-abbrev-alist' to what the OP wants, for commands (essentially all commands). By default, `C-x SPC' in Icicle mode is multi-command `icicle-command-abbrev'. It is similar to `M-x' but handles custom command abbreviations too. See the Icicles doc, section "Multi `M-x' with Abbreviations: `icicle-command-abbrev'". Doc string: ,---- | icicle-command-abbrev is an interactive compiled Lisp function in | `icicles-cmd1.el'. |=20 | It is bound to C-x SPC. |=20 | (icicle-command-abbrev) |=20 | Read command name or its abbreviation, read command args, call command. | Read input, then call `icicle-command-abbrev-action' to act on it. |=20 | If `icicle-add-proxy-candidates-flag' is non-nil, then command | abbreviations, as well as commands, are available as completion | candidates. Otherwise, only commands are available. You can toggle | `icicle-add-proxy-candidates-flag' using `C-M-_'in the minibuffer. |=20 | When an abbreviation is available, you can treat it just like a | command. The rest of this description covers the behavior of choosing | an abbreviation. |=20 | Completion for an abbreviation is lax. If you enter a new | abbreviation then it is added to option `icicle-command-abbrev-alist', | which is the list of your known abbreviations. You can also customize | this list. |=20 | If an abbreviation that you enter matches a single command name then | that command is invoked. If it matches more than one, then you can | use (strict) completion to choose one. |=20 | Hyphens (`-') in command names divide them into parts. For example, | `find-file' has two parts: `find' and `file'. Each character of a | command abbreviation corresponds to one part of each of the commands | that match the abbreviation. For example, abbreviation `ff' matches | commands `find-file' and `focus-frame', and abbreviation `fg' matches | `find-grep'. |=20 | If user option `icicle-command-abbrev-match-all-parts-flag' is nil | then an abbreviation need not match all parts of a command name; it | need match only a prefix. For example, if nil then abbreviation `ff' | also matches `find-file-other-window' and `fg' also matches | `find-grep-dired'. |=20 | You can use `C-$' to toggle filtering of candidates to those that are | bound to keys. |=20 | You can use `C-x C-a' to toggle showing key bindings as annotations. | (Menu bindings are not shown.) |=20 | Read input, then call `icicle-command-abbrev-action' | to act on it. |=20 | Input-candidate completion and cycling are available. While cycling, | these keys with prefix `C-' are active: |=20 | `C-mouse-2', `C-return' - Act on current completion candidate only | `C-down', `C-wheel-down' - Move to next completion candidate and act | `C-up', `C-wheel-up' - Move to previous completion candidate and act | `C-next' - Move to next apropos-completion candidate and act | `C-prior' - Move to previous apropos-completion candidate and act | `C-end' - Move to next prefix-completion candidate and act | `C-home' - Move to previous prefix-completion candidate and act | `C-!' - Act on *all* candidates, successively (careful!) |=20 | When candidate action and cycling are combined (e.g. `C-next'), user | option `icicle-act-before-cycle-flag' determines which occurs first. |=20 | With prefix `C-M-' instead of `C-', the same keys (`C-M-mouse-2', | `C-M-RET', `C-M-down', and so on) provide help about candidates. |=20 | Use `mouse-2', `RET', or `S-RET' to finally choose a candidate, or | `C-g' to quit. |=20 | This is an Icicles command - see command `icicle-mode'. `----