views:

417

answers:

3

There appears to be many alternative Emacs auto completion mechanisms. Without an exhaustive search, the following come to mind: ido, auto-complete, icicles, in buffer completion, minibuffer completion and standard out of the box completion. And then there is code completion. Lots of it. And much of it language dependent. It would be very useful to have an Emacs guru, or three, summarize the benefits of the major players in both code and non-code auto-completion. And this being Stack Overflow, it goes without saying that it would be good to identify the auto completion modes that work best for Emacs's IDE-like mechanisms.

Update: I just discovered the Emacs Wiki completion page which amplifies my basic question: of all these choices, what's good, what's less good and if you could only play with 2-3 which would you recommend?

+1  A: 

I use standard tab completion in the minibuffer for file names, M-x commands and other things.

I also frequently use the M-/ keystroke (dabbrev-expand) for dynamic completion of any word in any of your Emacs buffers. It is fantastic, especially for long variable names. Here is the documentation:

M-/ runs the command dabbrev-expand, which is an interactive
autoloaded Lisp function in `dabbrev.el'.

It is bound to M-/.

(dabbrev-expand ARG)

Expand previous word "dynamically".

Expands to the most recent, preceding word for which this is a prefix.
If no suitable preceding word is found, words following point are
considered.  If still no suitable word is found, then look in the
buffers accepted by the function pointed out by variable
`dabbrev-friend-buffer-function'.

A positive prefix argument, N, says to take the Nth backward *distinct*
possibility.  A negative argument says search forward.

If the cursor has not moved from the end of the previous expansion and
no argument is given, replace the previously-made expansion
with the next possible expansion not yet tried.

The variable `dabbrev-backward-only' may be used to limit the
direction of search to backward if set non-nil.

See also `dabbrev-abbrev-char-regexp' and C-M-/.
Paul Stephenson
A: 

You can look to company-mode or autocomplete package, that could use different completion sources, including CEDET, and they also allow to define new completion sources... For some programming languages, you can use CEDET directly...

Alex Ott
+1  A: 

I generally use two completion packages (other than the built-in TAB completion in the minibuffer and comint buffers).

pabbrev.el - which provides a suggestion at the cursor (press TAB) to accept. The choices are made by looking at word frequency. I like this because of the visual indication of what would be completed - but it mostly works for just one completion.

hippie-expand - which is generally bound to M-/ in place of dabbrev because it does all that dabbrev does and more. This works well when you might need to cycle through some alternatives, or if you want to complete a filename or something else.

I like both because they don't require any mouse movement and work quickly.

Trey Jackson