William Xu wrote:
Toby Cubitt <[EMAIL PROTECTED]> writes:
completion-UI is a nice idea.
The Emacs Wiki contains code snippets that provide the simple glue
between completion-UI and a number of completion-finding mechanisms (so
far: dabbrevs, etags, and predictive-mode).
I just tried dabbrev wrapper from the wiki, turn on
auto-completion-mode. It could display candicates in the minibuffer, and
after sometime show a popup menu. However, this process takes ten or so
seconds, so barely usable..
Auto-completion-mode is only useful when the function finding the
completions can return results within a few tenths of a second (i.e.
faster than your typing speed). Dabbrev was never designed to be that
fast. You can make things more workable by setting an
auto-completion-delay, but really you either need to use a completion
function that was designed for that kind of speed, or switch off
auto-completion-mode and stick to completion on demand (i.e. hitting a
key when you want to bring up completions). There's a good reason why
that's the default setting in completion-UI...
(The completion tool-tip pops up after a 3 second delay by default, but
you can of course customize this.)
The only completion functions I'm aware of that were designed to be fast
enough are those in the predictive-mode and pabbrev packages. Perhaps
this is because auto-completion makes most sense when the completion is
predictive.
If you want to get a taste of what auto-completion-mode is like when
you're a good completion function, you could try installing my
predictive package, since the completion-UI "glue" is already in place
and it enables auto-completion-mode by default. If you like it, but
would prefer to use pabbrev, then you could write the necessary pabbrev
wrapper function I mentioned previously. (Pabbrev and predictive-mode
work rather differently and serve different audiences - pabbrev is a
predictive version of dabbrev, in that it gathers its completions from
the buffer. Predictive-mode uses persistent dictionaries of completions,
which it "trains" and adds words to as you type. Although
predictive-mode can be configured to simulate pabbrev, there's probably
little point in doing so. You might as well use pabbrev!)
I looked into my .emacs, i have only set
`hippie-expand-try-functions-list'. Does this affect dabbrev wrapper ?
And i'm using 23.0.50 built on 20071020.
Not unless this affects dabbrev itself.
Toby
_______________________________________________
gnu-emacs-sources mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources