From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Toby Cubitt Newsgroups: gmane.emacs.devel Subject: Re: Emacs completion matches selection UI Date: Fri, 3 Jan 2014 22:06:10 +0000 Message-ID: <20140103220610.GA7614@c3po> References: Reply-To: Toby Cubitt NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1388786797 4874 80.91.229.3 (3 Jan 2014 22:06:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jan 2014 22:06:37 +0000 (UTC) Cc: Dmitry Gutov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 03 23:06:44 2014 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 1VzCt6-0002Tw-D0 for ged-emacs-devel@m.gmane.org; Fri, 03 Jan 2014 23:06:40 +0100 Original-Received: from localhost ([::1]:51951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzCt5-0006yF-Ub for ged-emacs-devel@m.gmane.org; Fri, 03 Jan 2014 17:06:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzCt0-0006y5-8q for emacs-devel@gnu.org; Fri, 03 Jan 2014 17:06:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VzCsv-0007fa-S5 for emacs-devel@gnu.org; Fri, 03 Jan 2014 17:06:34 -0500 Original-Received: from sanddollar.geekisp.com ([216.168.135.167]:13738) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1VzCsv-0007fW-OL for emacs-devel@gnu.org; Fri, 03 Jan 2014 17:06:29 -0500 Original-Received: (qmail 9284 invoked by uid 1003); 3 Jan 2014 22:06:29 -0000 Original-Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Fri, 03 Jan 2014 17:06:26 -0500 Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.dr-qubit.org/gpg-toby-pub.asc User-Agent: Mutt/1.5.22 (2013-10-16) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) X-Primary-Address: toby@dr-qubit.org X-detected-operating-system: by eggs.gnu.org: OpenBSD 4.x-5.x [fuzzy] X-Received-From: 216.168.135.167 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:167242 Archived-At: On Fri, Jan 03, 2014 at 02:32:40PM -0500, Stefan Monnier wrote: > >> > (Though I don't think the `completion-at-point' mechanism is really rich > >> > enough to let Predictive do its stuff properly; in particular updating > >> > the frequency data after completing.) > >> Seems that :exit-function can be used for this. See > >> `completion-extra-properties'. > > Thanks for the pointer. Unfortunately this isn't enough. In a typical > > predictive-mode scenario, there are many possible completion candidates, > > and Predictive needs to display them, and be told which of the candidates > > was selected (or rejected). > > I suspect that :exit-function is "enough", tho it might require some > ugly unreliable hacks to get at the needed data. Please try it out and > M-x report-emacs-bug requesting the extra features/data to be able to > "do it right". I still don't see how, if by "enough" you mean enough to emulate the current Predictive functionality without effectively bypassing the `completion-at-point' mechanism and running Predictive/Completion-UI code instead. `completion-at-point' is designed around "tab-completion", and that just isn't a good match for predictive completion (or a popup.el style UI, for that matter). Anyway, I think we basically agree: at the moment `completion-in-region-functions' and `completion-extra-properties' aren't enough to implement something like Predictive without ugly hacks. I also think if we can design a good generic Emacs completion UI and API, these issues will go away. Toby -- Dr T. S. Cubitt Royal Society University Research Fellow and Fellow of Churchill College, Cambridge Centre for Quantum Information DAMTP, University of Cambridge email: tsc25@cantab.net web: www.dr-qubit.org