From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: sort-lines including non ASCII Date: Fri, 08 Jul 2016 09:40:59 -0400 Message-ID: References: <87bn2b6buh.fsf@mat.ucm.es> <83zipun8cf.fsf@gnu.org> <87inwiom3w.fsf@web.de> <877fcxyk9j.fsf@mat.ucm.es> <83eg75lbok.fsf@gnu.org> <8760shfm0u.fsf@web.de> <83twg1jsjf.fsf@gnu.org> <87wpkx73ry.fsf@web.de> Reply-To: rms@gnu.org NNTP-Posting-Host: plane.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: ger.gmane.org 1467985333 5019 80.91.229.3 (8 Jul 2016 13:42:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2016 13:42:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 08 15:42:05 2016 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 1bLW2a-0002Rt-L0 for ged-emacs-devel@m.gmane.org; Fri, 08 Jul 2016 15:42:00 +0200 Original-Received: from localhost ([::1]:45690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLW2Z-0000WP-Jf for ged-emacs-devel@m.gmane.org; Fri, 08 Jul 2016 09:41:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLW1n-0000Jo-0W for emacs-devel@gnu.org; Fri, 08 Jul 2016 09:41:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLW1g-00009L-4g for emacs-devel@gnu.org; Fri, 08 Jul 2016 09:41:10 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLW1d-00007H-RZ; Fri, 08 Jul 2016 09:41:01 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1bLW1b-0006DP-2K; Fri, 08 Jul 2016 09:40:59 -0400 In-reply-to: <87wpkx73ry.fsf@web.de> (message from Michael Heerdegen on Thu, 07 Jul 2016 19:32:17 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:205430 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Since `sort-lines' calls `sort-subr' with a fixed second and third > argument, I guess we can assume that the key type the predicate must > accept is always the same: (#1=(beg . end) . #1#). It would be nice if > `sort-lines' as a function would at least accept an arbitrary predicate, > and we transform it to accept the correct key type and pass it to > `sort-subr', so that `string-collate-lessp' would work as PREDICATE > argument. Could you please show a concrete example of the code you propose ought to be accepted? The only way that occurs to me, to transform an arbitrary predicate, is to write a lambda expression around it which will handle the arguments as they are actually passed. That doesn't require any change in Emacs. That is a little inconvenient, and perhaps we could provide some more convenient interface -- but what, precsely, would it be? -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html.