[Top][All Lists]

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

Re: Emacs completion matches selection UI

From: Stefan Monnier
Subject: Re: Emacs completion matches selection UI
Date: Mon, 18 Nov 2013 19:43:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>>> In "(emacs.info) Completion Commands" there is help for using the
>>> rudimentary buffer to select completion matches.  I was struck by how
>>> hard to use this was, compared to more recent packages like these:
>>> http://www.emacswiki.org/emacs/AutoComplete
>>> http://www.emacswiki.org/emacs/CompanyMode
>>> Is there any chance the default Emacs appearance for selecting
>>> completion matches can be improved (not necessarily by default) for
>>> 24.4?  I would help with this but don't know what's "state of the art"
>>> and if there's already work in this direction.
BB> Unlike auto-complete-mode, Emacs's default completion system is rock-solid.
BB> :-) auto-complete uses some pretty messed up popup display library that
BB> doesn't play well with many packages. company-mode is much better in this
BB> regard.

company-mode's popup is also far from rock-solid (I have no experience
with auto-complete's popup, so can't compare).  But FWIW, I'd like to
move company-mode into the core completion code.

I've implemented a bridge between company-mode and
completion-at-point-functions ("company-capf"), and moved company-mode's
completion tables for Elisp into lisp-mode.el.  But there needs
to be some further integration work to make sure company-mode works well
with existing completion-at-point-functions.

But it wouldn't be enabled by default, anyway.

> The completion system is fine.  The selection of matches is the problem:
> 1) see a new buffer popup with minimal help text and no highlighting
> 2) left, right, up, down don't work
> 3) realize problem, switch to candidates buffer (mouse click or `C-x o')
> 4) select candidate you want, get popped in original buffer
> That's not simple!  It's not intuitive either, forcing me to use the
> mouse unless I've read the manual node referenced above.
> An alternative UI doesn't have to be fancy or graphical, only allow me
> to select from among the candidates immediately, without switching
> buffers, using the intuitive keys.  I hope that explains my request better.

Oh, that should be reasonably easy.  Just add the corresponding
key-bindings in minibuffer-local-completion-map, mostly.  The main issue
is to try and avoid clashing with existing bindings (since there are
2 buffers at play: the minibuffer and the *Completions* buffer), and
without C-x o, you're still in the minibuffer where left/right should
still mean "cursor movement in the minibuffer".


reply via email to

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