[Top][All Lists]

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

RE: Looking for universal completion with simple UI

From: Drew Adams
Subject: RE: Looking for universal completion with simple UI
Date: Sun, 5 Oct 2014 22:53:01 -0700 (PDT)

> Drew - thanks for the response. Yes, Icicles is the most
> comprehensive package for completion I've found, particularly for
> the mini buffer. I found it especially helpful to read you
> explaining the philosophy here:
> emacs-completion-mode-choices
> It appears Icicles is focused on mini-buffer completion though.
> Any tips for the various forms of in-buffer completion: searching,
> cycling through killed text, etc.?

One consideration is where you type the text to be completed, i.e.,
whether you type it first in the minibuffer or you type it directly
in the destination buffer.

IOW, even if you are completing text that you type into a buffer
(e.g., code), completion can use the minibuffer for (temporary)
text entry and another buffer (e.g. `*Completions*') for candidate
display. (Or it could, Ido-style, use the minibuffer for both input
and candidate display.)

To complete text in a buffer it is more common that you type there
and hit a key to complete there, without opening a minibuffer for
temporary text entry.  But where you enter the text is relevant
only to UI convenience, not to what kinds of completion are
available, for what contexts, etc.  Typing directly into the buffer
does have the advantage that you need not temporarily move your eye elsewhere 
(i.e., to the minibuffer or to `*Completions*').

It is true that Icicles does not have a lot of direct, particular
support for completing different kinds of buffer text.  It supports 
general, dynamic text completion (`dabbrev', `completion.el'). It supports BBDB 
text completion, comint (shell) text completion, and
Lisp symbol completion.  Other than those, it does not offer
anything special completing different kinds of text.

But if another library uses `completing-read' to provide a
particular form of text completion (e.g., completion for terms
in a particular programming language), then you can take
advantage of Icicles completion.  Most do not, AFAIK - they tend
to use in-buffer prefix entry and in-place cycling of completion

Wrt which packages provide particular support for different
programming languages, others will no doubt chime in with
suggestions.  For vanilla Emacs there are CEDET and Semantic,
and various programming-language modes should offer some text

If you look at the code for the Icicles versions of `dabbrev'
etc. completion (command `icicle-dabbrev-completion'), you will
see that it is essentially the vanilla code with Icicles
completion added to handle the multiple-candidates case.

This means that if you have some existing text-completion code,
you can likely convert it easily to take advantage of Icicles
completion for the multiple-candidates case.

(Dunno what you mean by "searching, cycling through killed text"
as "forms of in-buffer completion".  Icicles provides completion
for searching; for yanking kill-ring text; and for navigating
using Imenu, bookmarks, the mark-ring, tag files, Info nodes,
grep or occur hits, buffer narrowings, etc.  But I don't really
see such things as being forms of "in-buffer completion".)

reply via email to

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