From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: Human-readable file sorting Date: Fri, 19 Feb 2016 22:17:30 -0800 Message-ID: References: <87povs41xg.fsf@gnus.org> <87bn7c3yms.fsf@gnus.org> <87r3g7exb2.fsf@gnus.org> Reply-To: John Wiegley NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455949086 23770 80.91.229.3 (20 Feb 2016 06:18:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Feb 2016 06:18:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 20 07:17:59 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 1aX0ra-0007JC-Si for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 07:17:55 +0100 Original-Received: from localhost ([::1]:58501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX0ra-0005Tn-3a for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 01:17:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX0rL-0005TX-Nd for emacs-devel@gnu.org; Sat, 20 Feb 2016 01:17:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aX0rH-0007Uc-Ma for emacs-devel@gnu.org; Sat, 20 Feb 2016 01:17:39 -0500 Original-Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]:35450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX0rH-0007UY-EM for emacs-devel@gnu.org; Sat, 20 Feb 2016 01:17:35 -0500 Original-Received: by mail-pf0-x232.google.com with SMTP id c10so64850998pfc.2 for ; Fri, 19 Feb 2016 22:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:reply-to:mail-followup-to:mime-version:content-type; bh=vR/d3SBhPsyft9bYd4gz2grwR+7aUdyNbOLPhpaoC+I=; b=NCcnhsjKLUtuQQwtFEQhocYBUQbHSyxfavCBoB+Jw9QzgceBOKELn0ytZE8Dg1HZvg 3JyqbRSrVOTq8SMIryBssSfqMIat/TqsRx9hPzcfBA5DeVcRCp6QemoJqi/43HsYRh1d PRebcpE+Bndu648Is+uC4OFgARNaM8gsab0esGED+Rh0JYKNbdsVgEAHz3dWkBsxM4b/ 2rHlrvPX9olxlkBZUfGgDGPwPM0FyUp6OI4qHoG5fMmY38+fYr27L4MYeK+m6Y9epEzK j2+Wll0Ax5oCkut59tgnwVltqc2fDXKJpezxXVqhPq3hld+OjiWKv0WUOMyrbAL26bH/ Ch5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:reply-to:mail-followup-to:mime-version :content-type; bh=vR/d3SBhPsyft9bYd4gz2grwR+7aUdyNbOLPhpaoC+I=; b=NSqUWp9cANI3Rg7hWAC90gn9QJ5RZT+kKPfM4V1bo9V6iZeLshavPX88S62eEc1o73 ACZwld//OyA5U+LdrgZNkAnnAzQ8/dJqOezFtbSMTOez2uzU3/CL8rBETAFzCkIl4CVk YYF3hwifSlhPoLbW1lRBlqq9GZDSKmh2JB1oOoZLqMR0SMLMcARX/AKLH68afhiR9rdT +pR0MT0h4L0YE7GvYPiVwIzwUqoVLqVcS6sbz8uFq7HGydKo463MzqMzJ+ALoFW3mKA+ LtkKLchA83pikZTnTzZ50WUI7qwFxnAje6BLiGU70k+d2Bf7vr+hF/7o1zmPh3S/WsEc Y0dg== X-Gm-Message-State: AG10YOQPqZGLIU8qj9HWRKTF+A/tw+0pw7RRZc+ScymLVdwxM5B5VlcRzAfFM6NzYUI8Pg== X-Received: by 10.98.80.91 with SMTP id e88mr23345161pfb.62.1455949054667; Fri, 19 Feb 2016 22:17:34 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id ml5sm21069969pab.2.2016.02.19.22.17.33 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 19 Feb 2016 22:17:33 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id C048F130DB495; Fri, 19 Feb 2016 22:17:32 -0800 (PST) In-Reply-To: <87r3g7exb2.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 20 Feb 2016 17:00:01 +1100") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: Lars Ingebrigtsen , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::232 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:200274 Archived-At: >>>>> Lars Ingebrigtsen writes: > (defun file-string-lessp (s1 s2) > (pcase file-sorting-method > (,unicode > (string-lessp s1 s2)) > (,human > (human-string-lessp s1 s2))) > ..) > (Hey! Did I get the pcase syntax right? Bonus points!) Exception that you picked an instance better suited to `cl-case'. :) >> But having the extensibility does sound nice. > If the proposed method sounds fine, I can start implementing... It sounds reasonable to me. So for changing a single invocation of `directory-files', would I rely on `file-sorting-method' being a dynamic variable? -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2