unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Order of eshell/pcomplete completions when cycling
Date: Fri, 10 Apr 2015 13:08:01 +0200	[thread overview]
Message-ID: <87k2xkmeb2.fsf@gnu.org> (raw)
In-Reply-To: <83y4m1e0z8.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Apr 2015 19:10:51 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> assuming I have the directories test, test1, test2, and test11, when
>> I do `cd tes<TAB>' 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



  reply	other threads:[~2015-04-10 11:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 15:20 Order of eshell/pcomplete completions when cycling Tassilo Horn
2015-04-09 16:10 ` Eli Zaretskii
2015-04-10 11:08   ` Tassilo Horn [this message]
2015-04-10 11:21     ` Eli Zaretskii
2015-04-10 12:19       ` Tassilo Horn
2015-04-10 12:36         ` Stefan Monnier
2015-04-10 13:53           ` Tassilo Horn
2015-04-10 17:34             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2xkmeb2.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).