From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: completing-read return meta-information? Date: Wed, 16 Sep 2015 21:38:19 -0400 Message-ID: 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 1442453926 1569 80.91.229.3 (17 Sep 2015 01:38:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Sep 2015 01:38:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 17 03:38:37 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 1ZcO9k-00051n-Qc for ged-emacs-devel@m.gmane.org; Thu, 17 Sep 2015 03:38:36 +0200 Original-Received: from localhost ([::1]:55055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcO9k-000403-6y for ged-emacs-devel@m.gmane.org; Wed, 16 Sep 2015 21:38:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcO9Y-0003zd-A0 for emacs-devel@gnu.org; Wed, 16 Sep 2015 21:38:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcO9U-0005CS-9O for emacs-devel@gnu.org; Wed, 16 Sep 2015 21:38:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:8225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcO9U-0005C9-51 for emacs-devel@gnu.org; Wed, 16 Sep 2015 21:38:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AxFgA731xV/0jo92hcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEHAgEfizqFBQeELQWfF4ZpjwQjgWaCLiKCeAEBAQ X-IPAS-Result: A0AxFgA731xV/0jo92hcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEHAgEfizqFBQeELQWfF4ZpjwQjgWaCLiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="165073837" Original-Received: from 104-247-232-72.cpe.teksavvy.com (HELO pastel.home) ([104.247.232.72]) by ironport2-out.teksavvy.com with ESMTP; 16 Sep 2015 21:38:19 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 14DC562363; Wed, 16 Sep 2015 21:38:19 -0400 (EDT) In-Reply-To: <86twquxnpa.fsf@stephe-leake.org> (Stephen Leake's message of "Wed, 16 Sep 2015 12:45:37 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:190041 Archived-At: > 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". Another option is to use a completely different completion code (e.g. that's what filecache.el does). > 1) The completion table can add the absolute path in an `abspath' text > property of the completion string. I generally don't like the idea that the same text would fail to behave in the same way when written by hand by the user (in which case it won't have that text-property). Stefan