From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Emacs completion matches selection UI Date: Mon, 16 Dec 2013 10:17:26 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87y53komex.fsf@flea.lifelogs.com> References: <87fvqtg02v.fsf@flea.lifelogs.com> <877gc5fm30.fsf@flea.lifelogs.com> <87k3g47m7b.fsf@yandex.ru> <528B6F11.7070607@yandex.ru> <87y54ke8v3.fsf@flea.lifelogs.com> <87li0kdrsz.fsf@flea.lifelogs.com> <878uwi8t3r.fsf@mail.jurta.org> <83ob5ee7ow.fsf@gnu.org> <87d2ltl2if.fsf@mail.jurta.org> <8338moevm3.fsf@gnu.org> <8761rkaa5e.fsf@flea.lifelogs.com> <87txf0390n.fsf@flea.lifelogs.com> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387206996 7955 80.91.229.3 (16 Dec 2013 15:16:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Dec 2013 15:16:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 16 16:16:41 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VsZuT-0007GP-GT for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 16:16:41 +0100 Original-Received: from localhost ([::1]:56612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsZuS-0004BW-LZ for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 10:16:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsZuK-0004BI-BP for emacs-devel@gnu.org; Mon, 16 Dec 2013 10:16:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsZuE-0005DK-CM for emacs-devel@gnu.org; Mon, 16 Dec 2013 10:16:32 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:56699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsZuE-0005CH-5R for emacs-devel@gnu.org; Mon, 16 Dec 2013 10:16:26 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VsZuA-0006zv-9B for emacs-devel@gnu.org; Mon, 16 Dec 2013 16:16:22 +0100 Original-Received: from c-98-229-61-72.hsd1.ma.comcast.net ([98.229.61.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Dec 2013 16:16:22 +0100 Original-Received: from tzz by c-98-229-61-72.hsd1.ma.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Dec 2013 16:16:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-98-229-61-72.hsd1.ma.comcast.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:ciVoAHYNiWo/e+kIuJJQ00/KQPM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166476 Archived-At: 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