From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Order of eshell/pcomplete completions when cycling Date: Fri, 10 Apr 2015 13:08:01 +0200 Message-ID: <87k2xkmeb2.fsf@gnu.org> References: <871tjt49bj.fsf@gnu.org> <83y4m1e0z8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428664116 8062 80.91.229.3 (10 Apr 2015 11:08:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Apr 2015 11:08:36 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 10 13:08:23 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1YgWnO-0003Zb-O4 for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Apr 2015 13:08:22 +0200 Original-Received: from localhost ([::1]:38609 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgWnO-0000LQ-3k for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Apr 2015 07:08:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgWnC-0000LA-1d for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 07:08:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgWn7-0006UD-EY for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 07:08:09 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgWn7-0006To-84 for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 07:08:05 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B055420C13 for ; Fri, 10 Apr 2015 07:08:00 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 10 Apr 2015 07:08:04 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=03t62RgeXAkulrr+WesrdVAIxI8=; b=JZG1H 8+kQueWKP0MCIGbLY7XXHC2tRrHze+QCN96jZVV/egrzHFbZEqJuRrszeWcWf4Wq aWh6G1OrK4J5IpT9JgJ8T0n9InztMmrhptNzvtv9NGdByU12jwkpnQmMEsSKruLu khevuyQocu6R7m8IdTBx7CyxvRhzd1oPrtI5Vg= X-Sasl-enc: /3sslPtwYK4zvRwdeUfi4hnFRyMIMA9f4DYGs8H3Y460 1428664084 Original-Received: from thinkpad-t440p (unknown [2.163.240.161]) by mail.messagingengine.com (Postfix) with ESMTPA id CFDCEC00017; Fri, 10 Apr 2015 07:08:03 -0400 (EDT) Mail-Followup-To: Eli Zaretskii , help-gnu-emacs@gnu.org In-Reply-To: <83y4m1e0z8.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Apr 2015 19:10:51 +0300") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.28 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103627 Archived-At: Eli Zaretskii writes: Hi Eli, >> assuming I have the directories test, test1, test2, and test11, when >> I do `cd tes' in eshell, it'll cycle the possible completions in >> the order test2/, test1/, test/, test11/. >> >> In a typical shell like ZSH or BASH, the order would be test/, >> test1/, test11/, test2/, i.e., the completions come in lexicographic >> order. >> >> Now I've found `pcomplete-compare-entry-function' which is >> `string-lessp' by default and suggests alphabetic sorting. That >> variable is set buffer-locally to `file-newer-than-file-p' in eshell >> buffers, so it seems there sorting according to creation (or >> modification?) time is intended which is a very weird default value, >> IMHO. > > I think you want string-collate-lessp, not string-lessp. AFAIK, > that's what the shells use. Yes, you are right. Unfortunately, it seems the function used for `eshell-cmpl-compare-entry-function' (which is the default value for `pcomplete-compare-entry-function' in eshell buffers) has no effect on the order in which completions are cycled when hitting TAB repeatedly. Bye, Tassilo