[Top][All Lists]

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

Re: Completions in Semantic

From: Stefan Monnier
Subject: Re: Completions in Semantic
Date: Tue, 27 Oct 2009 23:23:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> Are you looking for examples of hooks that would be needed, or examples
> of behaviors that need hooks to be designed?

Examples of hooks that could make such things possible.

> * Annotate completions buffer output (as you describe)
> - I used to add () to a fcn, or other little things but clicking on a
>   completion name would then insert too much, so I removed the feature
>   from my version.

completion-annotate-function should cover these needs

> * Focus concept
> - Once a completions list is short enough, TABs that don't complete can
>   instead 'focus' on a completion.  Each new TAB moves the focus.

That sounds like the "cycling" behavior of some completion packages (or
like minibuffer-force-complete).  `pcomplete' for example has such
a feature, where if there are less than N completion candidates, TAB
cycles among them rather than completing the common prefix.

>   The focus could do almost anything depending on what is being
> completed.  For tags, it will flash the location of the tag in a buffer.
> It could show doc, or any other differentiating data that might be
> available.  ie - in Info nodes it could show the first paragraph.  For
> files it could show the first 500 bytes or some file status, for a
> buffer it could flip to it temporarily.  I expect most completable
> things could do something special.

I guess that could be done by adding a hook called when inserting
a "complete" completion.


reply via email to

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