[Top][All Lists]

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

Re: Emacs completion matches selection UI

From: Dmitry Gutov
Subject: Re: Emacs completion matches selection UI
Date: Fri, 20 Dec 2013 15:18:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Ted Zlatanov <address@hidden> writes:

> I agree that's a good API option (being able to specify asynchronous
> vs. synchronous completion) and the widget should support it.

I think synchronous vs. asynchronous is a concern of a backend, and it
has nothing to do with the widget. The latter only has to support the
mode of operation where it passes through most of the keystrokes (except
the ones specifically bound) through to Emacs. Or, better yet, captures
none of them and lets the main event loop trigger right commands in the
currently active maps, which in turn can modify the contents of the

Have you tried reading the company-mode source code?

> Yup, absolutely.  The autocomplete web browser widgets (e.g. the jQuery
> UI one) have that on-the-fly narrowing.  This specifically conflicts
> with the way in-buffer completion works right now

There's no real conflict, in-buffer completion could be made to work
this way. I believe it doesn't right now just because it could be too
performance-intensive when using some completion functions.

> IMO this should be an API option.

The API just has to allow updating the list on the fly.

> DG> 4. It does not support long lists.
> Showing icons for every list element would be a nice option, especially
> for the Unicode glyphs.

Will this require explicit support? Emacs supports inline images.

> It may be better for the API call to allow multiple columns as an
> option

I don't think multiple column display is a good option for a popup, at
all. Maybe as a special case, but that could be added later.

> but default to showing just what fits on the screen in a single column,
> indicating how many more candidates are not shown.  Something like this,
> if only 9 lines fit on the screen (the indicators for "100 more" would
> be appropriate to the native widget):

Yes. Or a scroll bar. Depending on how "native" the widget will be.

Another nice feature would be to allow "columns", but of a different
kind. The first column would be the completion options. The second one
would be their annotations (all lines up vertically). Maybe add the
option of having multiple annotations for the third, fourth, etc,

reply via email to

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