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: Mon, 6 Jan 2014 05:35:09 +0000 Message-ID: <20140106053509.GA5867@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 1388986529 28396 80.91.229.3 (6 Jan 2014 05:35:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Jan 2014 05:35:29 +0000 (UTC) Cc: emacs-devel@gnu.org, Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 06 06:35:36 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 1W02qe-0001n1-Ac for ged-emacs-devel@m.gmane.org; Mon, 06 Jan 2014 06:35:36 +0100 Original-Received: from localhost ([::1]:60813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W02qd-0002IO-V2 for ged-emacs-devel@m.gmane.org; Mon, 06 Jan 2014 00:35:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W02qR-0002II-Dk for emacs-devel@gnu.org; Mon, 06 Jan 2014 00:35:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W02qN-00036h-3O for emacs-devel@gnu.org; Mon, 06 Jan 2014 00:35:23 -0500 Original-Received: from starfish.geekisp.com ([216.168.135.166]:31816) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1W02qM-00036d-Vc for emacs-devel@gnu.org; Mon, 06 Jan 2014 00:35:19 -0500 Original-Received: (qmail 25402 invoked by uid 1003); 6 Jan 2014 05:35:18 -0000 Original-Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Mon, 06 Jan 2014 00:35:13 -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.166 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:167447 Archived-At: On Sun, Jan 05, 2014 at 11:03:45PM -0500, Stefan Monnier wrote: > > I agree. The `completion-at-point-functions' API is convoluted compared > > to either the Company-native API or the Completion-UI API. > > Partly for historical reasons, but partly because it handles more > complex kinds of completions, such as file-name completion with > partial-completion. Unless I've misunderstood what file-name completion with partial-completion is, I'm pretty sure Completion-UI can either handle this already with its non-prefix-completion sources, or these could readily be extended to do so. Completion-UI can handle completion sources that select an arbitrary substring of the buffer to be 'completed', and substitute arbitrary text for that string, whilst keeping track of what the original string was so you can continue completing it. > > On the other hand, it's already part of Emacs and is sufficiently > > flexible (if a little ugly). So we may be stuck with it now... > > Extending the company API or the completion-ui API to handle things > like filename completion (including the issues linked to handling > quoting/unquoting) is far from obvious, What's the roadblock here? I don't see it. > so whether we like it or not, I think that > completion-at-point-functions is not really negotiable. I figured you'd say that :-/ T. -- 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