help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: icicles, cua, and C-RET


From: Drew Adams
Subject: RE: icicles, cua, and C-RET
Date: Fri, 3 Mar 2006 09:11:31 -0800

    I've recently switched to using icicles & icomplete+ instead of
    mcomplete & iswitchb.

    One thing that bothers me is if I do 'C-x b' and enter a few letters
    and get a single-match I can't just hit enter and bring that
    buffer up... I must fully complete it.  According to the docs I
    should be able to do what I want by using C-RET instead...

It is the command that you have bound to `C-x b' that decides whether `RET'
first completes your input before exiting the minibuffer. By default,
standard Emacs command `switch-to-buffer' is bound to `C-x b', and it does
not exit upon partial match. This lets you create a new buffer, instead of
requiring you to switch to an existing buffer. Icicles does not bind any
command to `C-x b' - `switch-to-buffer' is the binding, unless you change
it. So, what bothers you is in fact, standard Emacs buffer switching ;-).

You can obtain iswitchb-like behavior with Icicles by binding command
`icicle-buffer' to `C-x b' and setting option
`icicle-buffer-require-match-flag' to `partial-match-ok'. See
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_S-RET ("Exiting the
Minibuffer without Confirmation: `S-RET'").

Further, since Icicles provides two kinds of completion matching: standard
prefix completion and apropos (regexp) completion, you can use `S-RET' (not
`C-RET') in the minibuffer to complete-and-exit using apropos completion and
use `RET' (like iswitchb) to complete-and-exit using prefix completion.

BTW (1) - You mentioned `C-RET'. There is no connection with `C-RET' and
exiting upon a partial match. In Icicles, `C-RET' in the minibuffer is for
choosing multiple completion candidates (or, by default, for help on each
candidate).

BTW (2) - You can use iswitchb for buffer switching and still use Icicles
for other completion. Some people do that. As I mentioned above, you can get
the iswitchb immediate-exit behavior within Icicles itself, but if you
really like other features of iswitchb then you can stick with it and still
take advantage of Icicles more generally. Icicles itself does not bind `C-x
b' (it does not change any global bindings), so it plays well with other
libraries like iswitchb.

    The icicles docs say to make sure it's loaded last in .emacs and it is
    in this case.

That's not necessary. It is recommended, however, because Icicles picks up
existing bindings that you (or, say, cua-mode) have created, and remaps them
to similar Icicles commands. For example, Icicle mode remaps (in the
minibuffer completion maps only) command `kill-region' to
`icicle-kill-region', which first does `kill-region' and then updates the
list of `*Completions*' (to provide icompletion in *Completions*). If your
.emacs binds `kill-region' to, say, <f3>, then Icicles will pick up this
binding and use it for `icicle-kill-region' in the minibuffer. That way,
Icicles will recognize that you expect <f3> to kill the region.

HTH.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]