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 16:48:02 +0000 Message-ID: <20140103164802.GA27022@c3po> References: <52C6E3EA.1080800@yandex.ru> 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 1388767711 10932 80.91.229.3 (3 Jan 2014 16:48:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jan 2014 16:48:31 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 03 17:48:38 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 1Vz7vK-0007Vt-31 for ged-emacs-devel@m.gmane.org; Fri, 03 Jan 2014 17:48:38 +0100 Original-Received: from localhost ([::1]:50661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vz7vJ-0006WK-I0 for ged-emacs-devel@m.gmane.org; Fri, 03 Jan 2014 11:48:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vz7vC-0006Vz-Di for emacs-devel@gnu.org; Fri, 03 Jan 2014 11:48:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vz7v7-0002pX-Uz for emacs-devel@gnu.org; Fri, 03 Jan 2014 11:48:30 -0500 Original-Received: from sanddollar.geekisp.com ([216.168.135.167]:26871) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Vz7v7-0002oj-Pj for emacs-devel@gnu.org; Fri, 03 Jan 2014 11:48:25 -0500 Original-Received: (qmail 27659 invoked by uid 1003); 3 Jan 2014 16:48:24 -0000 Original-Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Fri, 03 Jan 2014 11:48:16 -0500 Content-Disposition: inline In-Reply-To: <52C6E3EA.1080800@yandex.ru> 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:167186 Archived-At: On Fri, Jan 03, 2014 at 08:23:06PM +0400, Dmitry Gutov wrote: > On 03.01.2014 18:30, Toby Cubitt 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). Whereas, as I understand it, `completion-at-point' does "tab-completion", i.e. expansion to the longest common prefix. :exit-function tells you whether there was a unique completion, or if it was partially expanded but not complete, or if it is complete can could be expanded further. Predictive does allow standard "tab-completion", but it isn't so useful for predictive completion. It isn't the main completion mechanism in Predictive, nor is it the primary mechanism by which predictive trains its frequency tables. 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