[Top][All Lists]

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

Re: Completions in Semantic

From: Eric M. Ludlam
Subject: Re: Completions in Semantic
Date: Mon, 19 Oct 2009 15:33:44 -0400

On Mon, 2009-10-19 at 14:29 -0400, Stefan Monnier wrote:

> > * Inline completion in a buffer.  (ie - keymap, recursive-edit,
> >   minibuffer like, but in the buffer text with the intention of
> >   inserting that text..)
> You mean like lisp-complete-symbol but modal?

Yes, that's what I meant, but in light of your simplified description, I
suppose it doesn't matter much.  If there was a single function like
'completing-read' that took arguments to control what proposed text
after the cursor was, I suppose it wouldn't matter what happened
underneath.  I used overlays and overlay keymaps.

You could try semantic-complete-analyze-inline on something that needs
completing to see the effect I was going for.  It should work for Lisp
or C code.

I would expect designing such a thing would be challenging since the
rules for what is before the cursor is a bit vague and language
specific, so it might belong in a tool like Semantic.

> > * Option for using a CLOS object as an input to these tools.
> >   (ie - completion classes inherit from some interface.)
> >   as a way of managing persistent data between completion events.
> >   Just a favorite of mine, I'm sure.
> The functions that you can pass to try-completion and friends are
> basically objcts: the 3rd argument is the method to call.  So it should
> be trivial to write a wrapper that takes a CLOS object obeying
> a completion-interface and returns a lambda expression suitable for
> try-completion and friends.

I hadn't thought of that.  That sounds like a cool hack idea I'll have
to fiddle with.

Not as nice as an official interface though. ;)


reply via email to

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