From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Patch to implement sorting Org tables by IP address Date: Sat, 13 Dec 2014 15:29:31 +0100 Message-ID: <87tx0z8vxw.fsf@nicolasgoaziou.fr> References: <87r3w4a326.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzngd-0008S3-76 for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 09:28:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzngS-00066o-Rp for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 09:28:47 -0500 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:60457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzngS-00066e-Ld for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 09:28:36 -0500 In-Reply-To: (Jon Snader's message of "Sat, 13 Dec 2014 09:19:05 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jon Snader Cc: emacs-orgmode@gnu.org Jon Snader writes: > My idea for making it table driven is to add an alist whose elements look something like > > (prompt-char prompt extraction-function compare-function reverse-compare-function with-case-extraction-function) > > The alist would be initialized with the built-in options (including > the IP address sort) but a user could call add-to-list to add a custom > sort to his or her environment. I think my proposal is simpler: add ?f and ?F to built-in options, in which case user is prompted for a custom sorting function (in your case, `org-ip-lessp'). It is also more consistent with `org-sort-list'. Also, IMO, IP address sort should not be built-in, and needs not with the proposal above. Regards,