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, metadata and determining completions sort order Date: Sun, 19 Jun 2011 21:42:58 -0400 Message-ID: References: <19964.54886.521086.231349@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1308534199 11721 80.91.229.12 (20 Jun 2011 01:43:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2011 01:43:19 +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 Mon Jun 20 03:43:15 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QYTWF-0004LJ-C1 for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2011 03:43:15 +0200 Original-Received: from localhost ([::1]:35624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYTWE-0002Ir-MG for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2011 21:43:14 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYTW1-0002Ii-5D for emacs-devel@gnu.org; Sun, 19 Jun 2011 21:43:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYTW0-0001hA-CV for emacs-devel@gnu.org; Sun, 19 Jun 2011 21:43:01 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:53384 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYTW0-0001h5-9s for emacs-devel@gnu.org; Sun, 19 Jun 2011 21:43:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EABql/k1FpYrD/2dsb2JhbABFDaZbeIhzvWuDHoMMBJ1ZhCI X-IronPort-AV: E=Sophos;i="4.65,390,1304308800"; d="scan'208";a="116642440" Original-Received: from 69-165-138-195.dsl.teksavvy.com (HELO pastel.home) ([69.165.138.195]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 19 Jun 2011 21:42:59 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 46E5058B27; Sun, 19 Jun 2011 21:42:58 -0400 (EDT) In-Reply-To: (T. V. Raman's message of "Sun, 19 Jun 2011 09:32:34 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 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:140695 Archived-At: > Stefan, So the metadata gets placed as a property on the table? No, the table has to be a function (completion tables can be represented in many different ways: hash-table, obarray, list, alist, and function). Take a look at `completion-metadata' to see how the metadata is extracted (the Lisp manual still doesn't have the corresponding description :-( ). > Also I said the list would get traversed even if the sort > function was identity because the code does a funcall of the sort > function provided, but perhaps that's not a big issue. The "sort function" doesn't have to sort, it just takes a list and must return a list, it can return the list it receives without looking at it, as is the case if that function is `identity'. Stefan