Hi, Tony

I just tried the codes on Emacswiki (Example Using SemanticBovinator), but when i "eval-buffer", and then M-x  completion-setup-semantic , i was told that "completion-map" can not be found. And i think it's because:

  (define-key completion-map "." 'completion-self-insert))

I'm using the latest cedet from CVS now.

P.S: what about make a demo and put the link on Emacswiki? Users just can not image what the real effect is by only seeing the codes. :)

Thanks

On Mon, Oct 13, 2008 at 1:53 AM, Toby Cubitt <tsc25@cantab.net> wrote:

Hi Ming-Wei,

To use the completion-UI Semantic support, you just need to
cut-and-paste the EmacsWiki code into a file, load the code in Emacs
(e.g. visit the file and run `eval-buffer'), and run the
`completion-setup-semantic' command in the buffer in which you want to
use completion-UI and Semantic (and also enable Semantic, of course).

This should set everything up correctly. Then you can use any of the
myriad completion-UI features, e.g. `auto-completion-mode' (though with
Semantic, this is probably the least useful completion-UI feature...) or
"M-<tab>" to complete the word at point.

I just tested this with a new CVS checkout of CEDET, and it works for
me. Though it took a little bit of jiggling to get Semantic working (my
advice: read the INSTALL file more carefully than I did :). BTW, I just
fixed a small bug in the EmacsWiki code, which prevented the completion
browser from working.

There's no separate documentation for completion-UI yet (and I've been
saying "yet" for many years now :) but at least all the options are
reasonably well explained in the completion-ui customization group.


On a separate note, I was testing completion-UI + Semantic in an elisp
buffer, and the completions that Semantic *didn't* find were odd: typing
"(def" and completing gave no completions at all. Typing "(defu" gave
"defun*" as a completion, but not "defun". Strange. But that's a
Semantic issue (Eric?). Completion-UI can only work with whatever
completions it's given!

Company-mode looks nice. From what I can tell, it implements a subset of
the completion-UI in-buffer completion interfaces (what I call dynamic
completion, completion cycling, echo-area text, and tooltips), and also
provides pre-defined support for various completion mechanisms.
Equivalents for some of these in completion-UI are on the EmacsWiki
page, others you'd need to write yourself (much easier than it sounds!).

Hope that helps,

Toby



--
Zhiqiu Kong (孔直秋)