GNU bug report logs - #21284
eshell does not sort completion candidates

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Mon, 17 Aug 2015 18:08:01 UTC

Severity: minor

Tags: moreinfo

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: mbork <at> mbork.pl, 21284 <at> debbugs.gnu.org, npostavs <at> users.sourceforge.net
Subject: bug#21284: 25.0.50; `completion-file-name-table' should/not use `nreverse'?
Date: Tue, 07 Jun 2016 05:36:30 +0300
> Date:  Mon, 06 Jun 2016 13:00:40 -0700
> From:  Keith David Bershatsky <esq <at> lawlist.com>
> Cc:  21284 <at> debbugs.gnu.org,Marcin Borkowski <mbork <at> mbork.pl>,Noam Postavsky <npostavs <at> users.sourceforge.net>
> 
> If there is/are valid reason(s) to reverse the order, then perhaps consider mentioning one or more of those reasons in a comment within `completion-file-name-table' along with a mention of bug 21284.
> 
> If there is no valid reason whatsoever to reverse the order, then perhaps consider removing `nreverse` from `completion-file-name-table`.
> 
> If the issue is "de minimus", then the bug report can be closed without further ado.

I believe the reason is the usual one: we create the list by pushing
each new element onto it, so the result comes in reverse order of the
files.  The call to nreverse then restores the original order.  IOW,
this is an implementation detail.




This bug report was last modified 3 years and 68 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.