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:35:58 +0000 Message-ID: <20140103163558.GA11049@c3po> References: <20140102225831.GA19682@c3po> 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 1388766984 2006 80.91.229.3 (3 Jan 2014 16:36:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jan 2014 16:36:24 +0000 (UTC) Cc: 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:36:29 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 1Vz7jZ-0004Yw-FZ for ged-emacs-devel@m.gmane.org; Fri, 03 Jan 2014 17:36:29 +0100 Original-Received: from localhost ([::1]:50607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vz7jZ-0000Ld-52 for ged-emacs-devel@m.gmane.org; Fri, 03 Jan 2014 11:36:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vz7jR-0000LC-Uc for emacs-devel@gnu.org; Fri, 03 Jan 2014 11:36:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vz7jN-0007Eq-Kg for emacs-devel@gnu.org; Fri, 03 Jan 2014 11:36:21 -0500 Original-Received: from sanddollar.geekisp.com ([216.168.135.167]:12212) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Vz7jN-0007EY-GK for emacs-devel@gnu.org; Fri, 03 Jan 2014 11:36:17 -0500 Original-Received: (qmail 743 invoked by uid 1003); 3 Jan 2014 16:36:14 -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:36:12 -0500 Content-Disposition: inline In-Reply-To: <20140102225831.GA19682@c3po> 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:167184 Archived-At: On Thu, Jan 02, 2014 at 10:58:31PM +0000, Toby Cubitt wrote: > > Would you like to propose an API for it? Same as popup.el? > > As a first attempt, I'd propose something like > > (complete-in-buffer COMPLETION-SOURCE &optional PREFIX-FUNCTION) > > where COMPLETION-SOURCE is a function to call to obtain completions, and > PREFIX-FUNCTION is an optional function to call to determine what to > complete. > > Calling this would invoke whatever completion widgets the user had > enabled in customize (with sensible defaults - maybe the popup.el > interface or similar, or perhaps the default should be the usual > *Completions* buffer). Or one could simply enhance `completion-in-region' to display completions in the "more modern" UI, which the user can configure via customize. Would that be usable in Company, or is the `completion-in-region' API missing things you'd need? (It's currently missing things I'd need for Predictive, but not too much. I think they wouldn't be too hard to add.) 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