From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: completing-read return meta-information? Date: Thu, 17 Sep 2015 07:52:20 -0500 Message-ID: <86d1xhxl6j.fsf@stephe-leake.org> References: <86y4g6zcuo.fsf@stephe-leake.org> <7c37cd21-a9e0-48fa-b5a2-a32595c43dda@default> <86twquxnpa.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442494396 32077 80.91.229.3 (17 Sep 2015 12:53:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Sep 2015 12:53:16 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 17 14:53:05 2015 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 1ZcYgQ-00028L-Df for ged-emacs-devel@m.gmane.org; Thu, 17 Sep 2015 14:53:02 +0200 Original-Received: from localhost ([::1]:58410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcYgP-0007hs-ST for ged-emacs-devel@m.gmane.org; Thu, 17 Sep 2015 08:53:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcYg9-0007he-Vj for emacs-devel@gnu.org; Thu, 17 Sep 2015 08:52:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcYg5-00074j-Ub for emacs-devel@gnu.org; Thu, 17 Sep 2015 08:52:45 -0400 Original-Received: from gproxy7-pub.mail.unifiedlayer.com ([70.40.196.235]:46108) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZcYg5-00074F-NX for emacs-devel@gnu.org; Thu, 17 Sep 2015 08:52:41 -0400 Original-Received: (qmail 12181 invoked by uid 0); 17 Sep 2015 12:52:38 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy7.mail.unifiedlayer.com with SMTP; 17 Sep 2015 12:52:38 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw3 with id JJsY1r00Y2UdiVW01JsbDG; Thu, 17 Sep 2015 12:52:37 -0600 X-Authority-Analysis: v=2.1 cv=GpXRpCFC c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=ff-B7xzCdYMA:10 a=pk15dDS7kZn6uR5F7I8A:9 Original-Received: from [76.218.37.33] (port=51779 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZcYfx-0000Lg-5u for emacs-devel@gnu.org; Thu, 17 Sep 2015 06:52:33 -0600 In-Reply-To: (Stefan Monnier's message of "Wed, 16 Sep 2015 21:38:19 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 70.40.196.235 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:190043 Archived-At: Stefan Monnier writes: >> There is a desire to refactor this so that the only difference is inside >> the completion table. > > I think the uniquification shouldn't be done in the completion table. > > All the fancy rewriting to make things shorter should be done in the > completion-style, instead. The style code can choose to return different > kinds of results for completion-all-completions (which gets displayed > in *Completions*, in Company, or in Icomplete-mode and where we should > try and reduce redundancy) and for completion-try-completion. > > So completion-all-completions can return names like "foo" while > completion-try-completion can return "~/src/file/foo/toto/bar.agda". And I gather completing-read returns the result of completion-try-completion. Ok, I'll see if I can figure out how to implement completion style code. -- -- Stephe