unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Order of eshell/pcomplete completions when cycling
@ 2015-04-09 15:20 Tassilo Horn
  2015-04-09 16:10 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Tassilo Horn @ 2015-04-09 15:20 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

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.

Anyway, I've created the directories in the order stated above so it
doesn't conform with the actual cycling order I get when cycling thru
the completions.

Now I've set `eshell-cmpl-compare-entry-function' to `string-lessp'.
When I fire up a new eshell buffer, `pcomplete-compare-entry-function'
is initialized to `string-lessp' in there.  But the completion order
stays unaffected.  It's still test2/, test1/, test/, test11/.

So `pcomplete-compare-entry-function' and
`eshell-cmpl-compare-entry-function' are probably the wrong knobs.
Unfortunately, I don't find another option which seems relevant.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-10 17:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).