[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Abbrevs for the most frequent elisp symbols
From: |
Drew Adams |
Subject: |
RE: Abbrevs for the most frequent elisp symbols |
Date: |
Mon, 29 Dec 2014 07:28:08 -0800 (PST) |
> > 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.
>
> 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'.
|
| It is bound to C-x SPC.
|
| (icicle-command-abbrev)
|
| Read command name or its abbreviation, read command args, call command.
| Read input, then call `icicle-command-abbrev-action' to act on it.
|
| 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.
|
| 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.
|
| 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.
|
| 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.
|
| 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'.
|
| 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'.
|
| You can use `C-$' to toggle filtering of candidates to those that are
| bound to keys.
|
| You can use `C-x C-a' to toggle showing key bindings as annotations.
| (Menu bindings are not shown.)
|
| Read input, then call `icicle-command-abbrev-action'
| to act on it.
|
| Input-candidate completion and cycling are available. While cycling,
| these keys with prefix `C-' are active:
|
| `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!)
|
| When candidate action and cycling are combined (e.g. `C-next'), user
| option `icicle-act-before-cycle-flag' determines which occurs first.
|
| 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.
|
| Use `mouse-2', `RET', or `S-RET' to finally choose a candidate, or
| `C-g' to quit.
|
| This is an Icicles command - see command `icicle-mode'.
`----
- Re: Abbrevs for the most frequent elisp symbols, (continued)
- Re: Abbrevs for the most frequent elisp symbols, Andreas Röhler, 2014/12/29
- Re: Abbrevs for the most frequent elisp symbols, Tom, 2014/12/30
- Re: Abbrevs for the most frequent elisp symbols, Artur Malabarba, 2014/12/30
- Re: Abbrevs for the most frequent elisp symbols, Stefan Monnier, 2014/12/30
- Re: Abbrevs for the most frequent elisp symbols, Tom, 2014/12/31
- Re: Abbrevs for the most frequent elisp symbols, Artur Malabarba, 2014/12/31
- Re: Abbrevs for the most frequent elisp symbols, Robert Thorpe, 2014/12/31
- Re: Abbrevs for the most frequent elisp symbols, Óscar Fuentes, 2014/12/30
Message not available
Re: Abbrevs for the most frequent elisp symbols, Marcin Borkowski, 2014/12/29
- RE: Abbrevs for the most frequent elisp symbols,
Drew Adams <=
Re: Abbrevs for the most frequent elisp symbols, Emanuel Berg, 2014/12/28
Re: Abbrevs for the most frequent elisp symbols, Stefan Monnier, 2014/12/29
Re: Abbrevs for the most frequent elisp symbols, Marcin Borkowski, 2014/12/29
Re: Abbrevs for the most frequent elisp symbols, Stefan Monnier, 2014/12/29
Re: Abbrevs for the most frequent elisp symbols, Tom, 2014/12/29