emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs completion matches selection UI


From: Ted Zlatanov
Subject: Re: Emacs completion matches selection UI
Date: Mon, 16 Dec 2013 10:17:26 -0500
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

I looked carefully at the `completion-in-region-*' functions and
especially the `completion-in-region-mode' and its keymap.  This is for
the UI case of "I'm in a buffer and invoke `completion-at-point'".

It's a real mess.  We do a ton of special magic to avoid having a
special popup in favor of a *Completions* buffer.  The comment on
`completion-in-region--postch' says it pretty clearly:

;; It is difficult to know when to exit completion-in-region-mode (i.e. hide
;; the *Completions*).
;; - lisp-mode: never.
;; - comint: only do it if you hit SPC at the right time.
;; - pcomplete: pop it down on SPC or after some time-delay.
;; - semantic: use a post-command-hook check similar to this one.

If there was a special popup to show a list of items, like you see in
this snapshot of company-mode
http://company-mode.github.io/images/company-elisp.png , it would
abstract these difficulties and cut some nasty code out of
minibuffer.el.

We already have such popups natively for Customize with `widget-choose'
(supporting text in a nice buffer similar to *Completions* but with key
shortcuts and nice help test, and graphical UI with native popups) so I
hope it's not terribly hard to use that code more generally.  It seems
easier to improve `widget-choose' than to keep hacking on the special
*Completions* cases.

For the UI case of "I'm in the minibuffer and want to complete
something" I would rather wait for the general list popup to be
available with `widget-choose' than add the special down/up keybindings
that we discussed.  It will be a better UI in every way than the
*Completions* buffer IMO.

If you agree, I can pursue this after the upcoming release.  I think the
change is too risky for the short time we have this week.

Ted




reply via email to

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