From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.devel Subject: Re: sort-lines including non ASCII Date: Thu, 07 Jul 2016 07:35:34 +0000 Message-ID: <8737nlyk6x.fsf@mat.ucm.es> References: <87bn2b6buh.fsf@mat.ucm.es> <87zipveojj.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1467877257 18857 80.91.229.3 (7 Jul 2016 07:40:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2016 07:40:57 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 07 09:40:46 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 1bL3vQ-00060u-E9 for ged-emacs-devel@m.gmane.org; Thu, 07 Jul 2016 09:40:44 +0200 Original-Received: from localhost ([::1]:38019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL3vP-0005z0-QX for ged-emacs-devel@m.gmane.org; Thu, 07 Jul 2016 03:40:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL3ut-0005wN-G1 for emacs-devel@gnu.org; Thu, 07 Jul 2016 03:40:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bL3un-0006pe-HX for emacs-devel@gnu.org; Thu, 07 Jul 2016 03:40:10 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:32819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL3un-0006p2-AO for emacs-devel@gnu.org; Thu, 07 Jul 2016 03:40:05 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bL3um-0005ZN-3S for emacs-devel@gnu.org; Thu, 07 Jul 2016 09:40:04 +0200 Original-Received: from gilgamesch.quim.ucm.es ([147.96.12.99]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Jul 2016 09:40:04 +0200 Original-Received: from oub by gilgamesch.quim.ucm.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Jul 2016 09:40:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: gilgamesch.quim.ucm.es Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:uZ73PuNuV8qPZgU1N96rdetQx5Q= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:205302 Archived-At: > Uwe Brauer writes: > (sort (list "Arrieta" "Antón" "Álvarez") 'string-collate-lessp) > If that doesn't work, check your LOCALE (or LANG) environment variable > (see the docstring of string-collate-lessp for details). > Someting like > (sort (list "Antón" "Arrieta" "Álvarez") > (lambda (a b) > (string-collate-lessp a b "es_ES.UTF-8" t))) > should do the right thing regardless of your environment variables (at > least on GNU/Linux). Thanks but suppose I have 100 lines, using your solution would be cumbersome. Wouldn't it be better to modify sort-lines?