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: minibuffer-completion-help: make sorting of completions customizable? Date: Tue, 25 Jan 2011 16:13:08 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1295990082 29579 80.91.229.12 (25 Jan 2011 21:14:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 25 Jan 2011 21:14:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: "T.V. Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 25 22:14:38 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PhqDk-0001AJ-6l for ged-emacs-devel@m.gmane.org; Tue, 25 Jan 2011 22:14:36 +0100 Original-Received: from localhost ([127.0.0.1]:54185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhqDj-0005s7-MH for ged-emacs-devel@m.gmane.org; Tue, 25 Jan 2011 16:14:35 -0500 Original-Received: from [140.186.70.92] (port=59131 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhqDe-0005rp-Tv for emacs-devel@gnu.org; Tue, 25 Jan 2011 16:14:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhqDd-0001uI-Sk for emacs-devel@gnu.org; Tue, 25 Jan 2011 16:14:30 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhqDd-0001qC-OX for emacs-devel@gnu.org; Tue, 25 Jan 2011 16:14:29 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p0PLDEm0032520; Tue, 25 Jan 2011 16:13:20 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 35CAE130004; Tue, 25 Jan 2011 16:13:08 -0500 (EST) In-Reply-To: (T. V. Raman's message of "Tue, 25 Jan 2011 11:46:13 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3735=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134961 Archived-At: > As implemented, minibuffer-completion-help *always* sorts the > completion list using string-lessp. This works most of the time, > except when the caller has already > set up the completions to reflect a desired order. Could the > implementation be updated to provide a setting that could be let > bound by the caller? I've resisted it, because I think the right way is for the completion-table itself to provide this function (the difference becomes significant when completing things that are made of various parts, some of which may be sorted one way and others some other way), but this is a much more significant change. It basically means extending the `boundaries' method into a generic `meta-info' method that will include not just boundaries but also sort-order, type (e.g. it can tell whether you're completing buffers, files, or something else, which can then be associated to a config variable to use different completion-styles for different types of data), (un)quoting rules (needed for reliable completion of file names in *shell* buffers), a different separator than \n to use in the *Completions* buffer, ... Stefan