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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Keith David Bershatsky <esq@HIDDEN>; dated Mon, 17 Aug 2015 18:08:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Changed bug title to 'eshell does not sort completion candidates' from '25.0.50; `completion-file-name-table' should/not use `nreverse'?' Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 8 Jun 2016 02:43:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 07 22:43:18 2016
Received: from localhost ([127.0.0.1]:59346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bATSf-0000d7-QA
	for submit <at> debbugs.gnu.org; Tue, 07 Jun 2016 22:43:17 -0400
Received: from mail-oi0-f50.google.com ([209.85.218.50]:34654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1bATSe-0000cu-G9
 for 21284 <at> debbugs.gnu.org; Tue, 07 Jun 2016 22:43:16 -0400
Received: by mail-oi0-f50.google.com with SMTP id e72so307226790oib.1
 for <21284 <at> debbugs.gnu.org>; Tue, 07 Jun 2016 19:43:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:from:date:message-id
 :subject:to:cc;
 bh=jFStqwILnTA6PPFznsbhl+nT7dYmeiN55iFPZIRBL00=;
 b=pBTaMC4CBaLoQS2ecZyIn9qYRvmyDiOOdgMkS9CxNnJN8ShcscvaxsSKi4Qsf2tCWW
 WudIlCvVEcaG/oyGOhlyPT6I07AQ5LQfN3FX2LpuLgnitYBeiqslYuhjg4d8nBmOvbjQ
 VEV1R4Ue60nEyU8HuFT9d9GiBAL3ntgm2QfIIjKgHU2dgr6rZ8aMSJutO5GVgQmG9n9Y
 GQjwwpvhiQywQB11E6JzoRgg8DIn/yHqADau51IjhlEhUeY0zq3RFCUGnN1osHZbaCx6
 mvfeA5d0eWdZ/3NwFH3/C4ya0/5OzKOHfdkvmMHydDlREDgnliB0ez/Uq16m6xX4AT/2
 jnFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc;
 bh=jFStqwILnTA6PPFznsbhl+nT7dYmeiN55iFPZIRBL00=;
 b=RAs5+f3Qg+Ko2OXXbQdaOb4+YIOVQKyewmcVeMf9EHig3ETpix1U9LNiU9lg6/Pf/G
 RUhpqgX4EB705wS5Zzr4qbXBCATPrBAKjpcH5WixM803uD1hd10+cuC47/SGqpTrmwVq
 FzYNba9SGOW5zp68uSCw36AhmEP9K/kimpE9MA0GnxCvHrSvbO+v7X/5BR8j853bVZco
 D9ge8phWsLP+UHkrWJnSPEOEZufY1HeXlGAIPzD6xaHm/dCIQo11R3g4QqLkT+dnkfgu
 nIvgdTbF1uq1MWoc4pyQ2DeS5FicIcNtvu4Gzvu4ac708RP79VpCmNh+5XEw5z6MJLo/
 dgDQ==
X-Gm-Message-State: ALyK8tKjFrfqjStkO8IlHOdV0thWdLCZuyvTBx6V/oK68H1h1JCBrGMe86xb1ZsCptT7outMflp5LZHnCJAhxw==
X-Received: by 10.202.245.196 with SMTP id t187mr1342792oih.178.1465353790727; 
 Tue, 07 Jun 2016 19:43:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.5.168 with HTTP; Tue, 7 Jun 2016 19:43:10 -0700 (PDT)
In-Reply-To: <8337oqtan6.fsf@HIDDEN>
References: <m2r3ca9tok.wl%esq@HIDDEN> <8337oqtan6.fsf@HIDDEN>
From: Noam Postavsky <npostavs@HIDDEN>
Date: Tue, 7 Jun 2016 22:43:10 -0400
X-Google-Sender-Auth: VI5voEUGpIDcSlLTbl-H2HK4bUo
Message-ID: <CAM-tV--kZUTOmhyyPp82bz5CRV6FtLrt=MfAQLH1K1CHZsyo0g@HIDDEN>
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 21284
Cc: Marcin Borkowski <mbork@HIDDEN>, Keith David Bershatsky <esq@HIDDEN>,
 21284 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

retitle 21284 eshell does not sort completion candidates
quit

On Mon, Jun 6, 2016 at 2:50 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
> Then what exactly is the problem here?  Emacs doesn't know in what
> order the files are returned, it considers the order random.
> Reversing a randomly ordered list produces another randomly ordered
> list.  Applications that need to present the list in some specific
> order need to do that explicitly.  For example, "C-x C-f TAB TAB" does
> display the files in alphabetic order for me, not in reverse
> alphabetic order.

So the problem is that eshell's completion doesn't sort its candidates.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 7 Jun 2016 02:36:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 06 22:36:52 2016
Received: from localhost ([127.0.0.1]:57318 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bA6su-000605-Cm
	for submit <at> debbugs.gnu.org; Mon, 06 Jun 2016 22:36:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48354)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1bA6ss-0005zs-75
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 22:36:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1bA6si-0000cP-3d
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 22:36:44 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38034)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1bA6s1-0000Xm-Kh; Mon, 06 Jun 2016 22:35:57 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4345
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1bA6rz-0000RD-Ik; Mon, 06 Jun 2016 22:35:56 -0400
Date: Tue, 07 Jun 2016 05:36:30 +0300
Message-Id: <83shwpsp1t.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Keith David Bershatsky <esq@HIDDEN>
In-reply-to: <m2lh2igk9j.wl%esq@HIDDEN> (message from Keith David
 Bershatsky on Mon, 06 Jun 2016 13:00:40 -0700)
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
References: <m2lh2igk9j.wl%esq@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: 21284
Cc: mbork@HIDDEN, 21284 <at> debbugs.gnu.org, npostavs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.4 (------)

> Date:  Mon, 06 Jun 2016 13:00:40 -0700
> From:  Keith David Bershatsky <esq@HIDDEN>
> Cc:  21284 <at> debbugs.gnu.org,Marcin Borkowski <mbork@HIDDEN>,Noam Postavsky <npostavs@HIDDEN>
> 
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.
Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Removed tag(s) unreproducible. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 6 Jun 2016 23:12:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 06 19:12:09 2016
Received: from localhost ([127.0.0.1]:57181 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bA3gn-0004nO-EU
	for submit <at> debbugs.gnu.org; Mon, 06 Jun 2016 19:12:09 -0400
Received: from mail-oi0-f44.google.com ([209.85.218.44]:33021)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1bA3gl-0004n3-Mf
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 19:12:07 -0400
Received: by mail-oi0-f44.google.com with SMTP id k23so250577175oih.0
 for <21284 <at> debbugs.gnu.org>; Mon, 06 Jun 2016 16:12:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:from:date:message-id
 :subject:to:cc;
 bh=+eL20m+Yfo7bpceJ4Kdv/HvwQDXHx2TZK+TUeTFKYU8=;
 b=yrBq6bjBBIapO5dJ8MM68sPmDUNm08XTlCkaq1x3Z3789qHNBVqThr8cMP7EBzcYmA
 TOhh4evR+DzBbX7xrLSWi//tcm8ijVNqT3hXk7KrQjTCDe59wy2Xz1HD6AyN0xYRVvbw
 AQWCiW+5ke2BFGA+UwcfU36PnGxlxkhkg4ajONKUrgF9woeA0Ap1gKUt5GaVNta4TKCb
 TwBQbxRijL5723pFeod3R2fM3699ft+xiw1FBL7QMJ0s/FfyjetHROJlylG/UYvUxVsq
 WOzlThW4+/CVlBqMEOYgTPAd5mRsjJ5V8t3o09YpaEr2HY6FDpgeZmXO2aMP1PT0wqEW
 X60Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc;
 bh=+eL20m+Yfo7bpceJ4Kdv/HvwQDXHx2TZK+TUeTFKYU8=;
 b=Ik0D1ZPS8WaCtMEu9Gk7bLCU81O9SI+QJnhrue3INthKWJHK8Bda86spwrLA6NnMt0
 uOyVF5HEOlsNJWDspB3Bvcw6eY0pG88mT4Liti7H3bWjPK5my8bvYW7vQ/JntcYZOTjc
 JN5BP9n0dE7RihI0dfUvoPu3DwQb1orDCnuikk4mn8eFgD6ku8OTLJlFhE7VvNWp2wgj
 MejCCV4Wkvpry/hZzfMOvOKR7mJObg8EyPHp1jhtddyiD0GYwuPb8akiqwuhmMEVlQU9
 aex6p8dIrKE7eQVX3D8HYFEl7xGGlK6fDhUcoC6EpdRhT7jB5SXswkK52Dy3ihbaNlaX
 E+0w==
X-Gm-Message-State: ALyK8tKDHJUu9AG1qET8xqokYTamewuoDs+EI6aXBXwHtip/czmjm+xdbT1N+jDvXWf8othaNBdPNRKc/QoA3w==
X-Received: by 10.157.51.74 with SMTP id u10mr10555360otd.124.1465254721892;
 Mon, 06 Jun 2016 16:12:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.5.168 with HTTP; Mon, 6 Jun 2016 16:12:01 -0700 (PDT)
In-Reply-To: <83mvmytm2v.fsf@HIDDEN>
References: <m2egj1rfnq.wl%esq@HIDDEN>
 <CAM-tV-9x+s3w0Y8xF+Wn4fS8At5LsvWVE-bkK1jyN7Nx86qHgg@HIDDEN>
 <83mvmytm2v.fsf@HIDDEN>
From: Noam Postavsky <npostavs@HIDDEN>
Date: Mon, 6 Jun 2016 19:12:01 -0400
X-Google-Sender-Auth: G4OypX8s8AaK35_2AYb-Ic1XSg0
Message-ID: <CAM-tV--2R8rXcEKg87SRn5ayMe3g85V1Znh4ERBXw1gdSKa6Rg@HIDDEN>
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 21284
Cc: Marcin Borkowski <mbork@HIDDEN>, Keith David Bershatsky <esq@HIDDEN>,
 21284 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

tag 21284 - unreproducible
severity 21284 minor
quit

On Mon, Jun 6, 2016 at 10:43 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> I suspect that there's a hidden factor here: the order in which the
> 'readdir' libc function returns the directory entries.  On GNU/Linux,
> the order is arbitrary (AFAIK, it's the order of the entries in the
> directory file).  On MS-Windows, the order is alphabetic, so reversing
> will produce the reverse alphabetic order.  I don't know what happens
> on OS X.

Oh yeah, I see reversed order on Windows.

On Mon, Jun 6, 2016 at 12:19 PM, Keith David Bershatsky <esq@HIDDEN> wrote:
> I am on OS X and the default sort order is alphabetic, which gets reversed by `completion-file-name-table` because it uses `nreverse'.

Actually, the result from `file-name-all-completions` is already
reversed. `completion-file-name-table` then reverses it twice: once in
the loop (dolist (tem all) (... (push tem comp))), and the `nreverse`
call to undo it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 6 Jun 2016 20:00:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 06 16:00:59 2016
Received: from localhost ([127.0.0.1]:57079 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bA0hn-0000HB-Jc
	for submit <at> debbugs.gnu.org; Mon, 06 Jun 2016 16:00:59 -0400
Received: from beige.birch.relay.mailchannels.net ([23.83.209.16]:54643
 helo=gt-egress-001.mailchannels.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <esq@HIDDEN>) id 1bA0hl-0000H1-IJ
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 16:00:58 -0400
X-Sender-Id: _forwarded-from|45.48.239.195
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id AF214122253;
 Mon,  6 Jun 2016 20:00:45 +0000 (UTC)
Received: from cobb.liquidweb.com
 (ip-10-123-105-117.us-west-2.compute.internal [10.123.105.117])
 by relay.mailchannels.net (Postfix) with ESMTPA id 4645B121B1C;
 Mon,  6 Jun 2016 20:00:44 +0000 (UTC)
X-Sender-Id: _forwarded-from|45.48.239.195
Received: from cobb.liquidweb.com (cobb.liquidweb.com [10.135.9.54])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA)
 by 0.0.0.0:2500 (trex/5.6.14); Mon, 06 Jun 2016 20:00:45 +0000
X-MC-Relay: Forwarding
X-MailChannels-SenderId: _forwarded-from|45.48.239.195
X-MailChannels-Auth-Id: liquidweb
X-MC-Loop-Signature: 1465243273573:3205704977
X-MC-Ingress-Time: 1465243273573
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:51977
 helo=server.local.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>)
 id 1bA0hU-0006eB-9K; Mon, 06 Jun 2016 16:00:40 -0400
Date: Mon, 06 Jun 2016 13:00:40 -0700
Message-ID: <m2lh2igk9j.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AuthUser: 
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 21284
Cc: Marcin Borkowski <mbork@HIDDEN>, 21284 <at> debbugs.gnu.org,
 Noam Postavsky <npostavs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

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.

Keith

At Mon, 06 Jun 2016 21:50:05 +0300,
Eli Zaretskii wrote:
> 
> . . .
> 
> Then what exactly is the problem here?  Emacs doesn't know in what
> order the files are returned, it considers the order random.
> Reversing a randomly ordered list produces another randomly ordered
> list.  Applications that need to present the list in some specific
> order need to do that explicitly.  For example, "C-x C-f TAB TAB" does
> display the files in alphabetic order for me, not in reverse
> alphabetic order.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 6 Jun 2016 18:52:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 06 14:52:32 2016
Received: from localhost ([127.0.0.1]:57026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b9zdY-00076o-Aa
	for submit <at> debbugs.gnu.org; Mon, 06 Jun 2016 14:52:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38769)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1b9zdX-00076d-EB
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 14:52:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1b9zdO-0002Qn-Ea
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 14:52:26 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57231)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1b9zce-0002IM-71; Mon, 06 Jun 2016 14:51:36 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4143
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1b9zcY-0003os-Mv; Mon, 06 Jun 2016 14:51:34 -0400
Date: Mon, 06 Jun 2016 21:50:05 +0300
Message-Id: <8337oqtan6.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Keith David Bershatsky <esq@HIDDEN>
In-reply-to: <m2r3ca9tok.wl%esq@HIDDEN> (message from Keith David
 Bershatsky on Mon, 06 Jun 2016 09:19:07 -0700)
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
References: <m2r3ca9tok.wl%esq@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: 21284
Cc: mbork@HIDDEN, 21284 <at> debbugs.gnu.org, npostavs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.4 (------)

> Date:  Mon, 06 Jun 2016 09:19:07 -0700
> From:  Keith David Bershatsky <esq@HIDDEN>
> Cc:  21284 <at> debbugs.gnu.org,Noam Postavsky <npostavs@HIDDEN>,Marcin Borkowski <mbork@HIDDEN>
> 
> I am on OS X and the default sort order is alphabetic, which gets reversed by `completion-file-name-table` because it uses `nreverse'.

Then what exactly is the problem here?  Emacs doesn't know in what
order the files are returned, it considers the order random.
Reversing a randomly ordered list produces another randomly ordered
list.  Applications that need to present the list in some specific
order need to do that explicitly.  For example, "C-x C-f TAB TAB" does
display the files in alphabetic order for me, not in reverse
alphabetic order.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 6 Jun 2016 16:19:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 06 12:19:20 2016
Received: from localhost ([127.0.0.1]:56940 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b9xFI-0001pD-CE
	for submit <at> debbugs.gnu.org; Mon, 06 Jun 2016 12:19:20 -0400
Received: from black.birch.relay.mailchannels.net ([23.83.209.19]:43811
 helo=gt-egress-001.mailchannels.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <esq@HIDDEN>) id 1b9xFG-0001p3-60
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 12:19:18 -0400
X-Sender-Id: _forwarded-from|45.48.239.195
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id F1437100416;
 Mon,  6 Jun 2016 16:19:12 +0000 (UTC)
Received: from cobb.liquidweb.com (ip-10-213-0-221.us-west-2.compute.internal
 [10.213.0.221])
 by relay.mailchannels.net (Postfix) with ESMTPA id 68ADB100232;
 Mon,  6 Jun 2016 16:19:11 +0000 (UTC)
X-Sender-Id: _forwarded-from|45.48.239.195
Received: from cobb.liquidweb.com (cobb.liquidweb.com [10.29.31.47])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA)
 by 0.0.0.0:2500 (trex/5.6.14); Mon, 06 Jun 2016 16:19:12 +0000
X-MC-Relay: Forwarding
X-MailChannels-SenderId: _forwarded-from|45.48.239.195
X-MailChannels-Auth-Id: liquidweb
X-MC-Loop-Signature: 1465229952063:290580071
X-MC-Ingress-Time: 1465229952063
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49641
 helo=server.local.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>)
 id 1b9xF7-00082c-Mg; Mon, 06 Jun 2016 12:19:09 -0400
Date: Mon, 06 Jun 2016 09:19:07 -0700
Message-ID: <m2r3ca9tok.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AuthUser: 
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 21284
Cc: Marcin Borkowski <mbork@HIDDEN>, 21284 <at> debbugs.gnu.org,
 Noam Postavsky <npostavs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

I am on OS X and the default sort order is alphabetic, which gets reversed by `completion-file-name-table` because it uses `nreverse'.

Keith

At Mon, 06 Jun 2016 17:43:04 +0300,
Eli Zaretskii wrote:
> 
> . . .
> 
> I suspect that there's a hidden factor here: the order in which the
> 'readdir' libc function returns the directory entries.  On GNU/Linux,
> the order is arbitrary (AFAIK, it's the order of the entries in the
> directory file).  On MS-Windows, the order is alphabetic, so reversing
> will produce the reverse alphabetic order.  I don't know what happens
> on OS X.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 6 Jun 2016 14:43:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 06 10:43:34 2016
Received: from localhost ([127.0.0.1]:56878 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b9vkb-00081k-PN
	for submit <at> debbugs.gnu.org; Mon, 06 Jun 2016 10:43:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45372)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1b9vkZ-00081X-8H
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 10:43:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1b9vkP-0007ry-4e
 for 21284 <at> debbugs.gnu.org; Mon, 06 Jun 2016 10:43:26 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52748)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1b9vjd-0007Rq-99; Mon, 06 Jun 2016 10:42:33 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4029
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1b9vjb-0005Zx-5i; Mon, 06 Jun 2016 10:42:31 -0400
Date: Mon, 06 Jun 2016 17:43:04 +0300
Message-Id: <83mvmytm2v.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
In-reply-to: <CAM-tV-9x+s3w0Y8xF+Wn4fS8At5LsvWVE-bkK1jyN7Nx86qHgg@HIDDEN>
 (message from Noam Postavsky on Sun, 5 Jun 2016 22:50:10 -0400)
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
References: <m2egj1rfnq.wl%esq@HIDDEN>
 <CAM-tV-9x+s3w0Y8xF+Wn4fS8At5LsvWVE-bkK1jyN7Nx86qHgg@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: 21284
Cc: mbork@HIDDEN, esq@HIDDEN, 21284 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.4 (------)

> From: Noam Postavsky <npostavs@HIDDEN>
> Date: Sun, 5 Jun 2016 22:50:10 -0400
> Cc: Keith David Bershatsky <esq@HIDDEN>, Marcin Borkowski <mbork@HIDDEN>
> I'm getting completions in what looks like a random order, here are
> the first few lines for completions in the emacs src directory:

I suspect that there's a hidden factor here: the order in which the
'readdir' libc function returns the directory entries.  On GNU/Linux,
the order is arbitrary (AFAIK, it's the order of the entries in the
directory file).  On MS-Windows, the order is alphabetic, so reversing
will produce the reverse alphabetic order.  I don't know what happens
on OS X.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.
Added tag(s) unreproducible. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 6 Jun 2016 02:50:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 05 22:50:18 2016
Received: from localhost ([127.0.0.1]:56074 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b9kcM-0000wM-9J
	for submit <at> debbugs.gnu.org; Sun, 05 Jun 2016 22:50:18 -0400
Received: from mail-oi0-f46.google.com ([209.85.218.46]:33022)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1b9kcK-0000w8-9A
 for 21284 <at> debbugs.gnu.org; Sun, 05 Jun 2016 22:50:16 -0400
Received: by mail-oi0-f46.google.com with SMTP id k23so206693904oih.0
 for <21284 <at> debbugs.gnu.org>; Sun, 05 Jun 2016 19:50:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:from:date:message-id:subject:to:cc;
 bh=xB78X4r9a51iIw7UESZa1IYdcgBmoFe6UAMTwydBG3U=;
 b=D24KYJUup0KXMBWRzZ7cvsO5ea4W3oUCUZQpwVGwlaBWqKok91wVkPfxsCoBZTqj2g
 yVAanRfRqllwxIi4W2/OwkwwwN1EmtUxfGfhQmpJt7MW4I8/SX8QECogPJErcgE33TX9
 8GxEd1YM88I5CQsaa9BjeTLDlOOznsmTtunAf73+0X6iWva2m9hiAm3ycSpeHvAmobMN
 5KYjdljcS0mLGG2y/m/qKomxcNwu8Hb6vsM4wikIm7+aaymVRo26hClSZXfjDooskLuB
 6pBXtyUYc7XZvsxpml21E2dRs9MyIL54tqLzaPKK1s2Oh17UvLL4awEdUrqVrKwzXijN
 kFYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:from:date:message-id:subject
 :to:cc;
 bh=xB78X4r9a51iIw7UESZa1IYdcgBmoFe6UAMTwydBG3U=;
 b=Pwg47nz+h/qMdV4B4Mdq4cGs20O/JTTErftBey1Chcm77kXKMNzTelbkIkKSVq3G2W
 z1+YSGRStVmAAZ7Tg08ALiwgOjiawte78PhVbS2OyTQEQzOy0jUAr4uk23JoSYKf/EGZ
 WbcCw3ovqlresfHHCeCxZ2d17TuEAas4KP5uJNKKzjLKrvsac3xsLETlVLnBYbVjCpGV
 oq8JXj4aYCgfGYU1TmUcVfISpTvpro0aG7Oo4VCKEDhRYFsD8oDayzXvGZ7PEOAUFU+M
 IpA/i20Cu3U4ka6A8i9t1WiIgA5xoQXUB5Lj2+a1IBi96sqfBtrexTeTFdVFXSRUSJFe
 qlew==
X-Gm-Message-State: ALyK8tLyO49o7Tx28RPOo+TYVQMRsresC6pOsyx5G3MsrryZ0AD4phyFiRZfHps69r0qVlmc/MkytCK/WPW/Tg==
X-Received: by 10.157.1.11 with SMTP id 11mr7829794otu.17.1465181410640; Sun,
 05 Jun 2016 19:50:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.5.168 with HTTP; Sun, 5 Jun 2016 19:50:10 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
Date: Sun, 5 Jun 2016 22:50:10 -0400
X-Google-Sender-Auth: 3ry3qBk6TSD8_MmVQ6i4b16p4hE
Message-ID: <CAM-tV-9x+s3w0Y8xF+Wn4fS8At5LsvWVE-bkK1jyN7Nx86qHgg@HIDDEN>
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
To: 21284 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 21284
Cc: Keith David Bershatsky <esq@HIDDEN>, Marcin Borkowski <mbork@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

tag 21284 unreproducible
quit

I'm getting completions in what looks like a random order, here are
the first few lines for completions in the emacs src directory:

Possible completions are:
undo.o     ChangeLog.12     eval.o     insdel.o
xfaces.o     sysdep.o     category.o     marker.o
search.c     ChangeLog.10     fontset.o     dynlib.h
kqueue.c     deps/     lastfile.o     dired.o
insdel.c     w32fns.c     textprop.o     xselect.c
inotify.c     doprnt.c     cmds.c     xdisp.c
data.o     fontset.c     xsettings.h     character.o
keymap.c     xsettings.o     emacsgtkfixed.h     systime.h
syntax.h     bytecode.o     character.h     deps.mk




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 4 May 2016 18:14:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 04 14:14:16 2016
Received: from localhost ([127.0.0.1]:38157 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ay1JQ-0005KN-E5
	for submit <at> debbugs.gnu.org; Wed, 04 May 2016 14:14:16 -0400
Received: from cobb.liquidweb.com ([50.28.13.150]:34715)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <esq@HIDDEN>) id 1ay1JN-0005K1-Fl
 for 21284 <at> debbugs.gnu.org; Wed, 04 May 2016 14:14:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com;
 s=default; 
 h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date;
 bh=rqbE2TFPpjfR9LZePOjLkaUdCSYLtSRkcl56LYOrUtw=; 
 b=NRQPqB2kLHthui8MjVqZYX1Gl4mz8Nojf1KJna5im+eaYXhxUzWtlbMTNnKwivPT1fjJGd8Ix87/HeTByincdWu1iWHtUHmKd8ABHlV75uKNDZLYF70jeXA8gPbE8kgW;
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49212
 helo=mb.local.localhost) by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>)
 id 1ay1JE-0001Lc-TB; Wed, 04 May 2016 14:14:05 -0400
Date: Wed, 04 May 2016 11:14:06 -0700
Message-ID: <m2a8k5adxt.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: Marcin Borkowski <mbork@HIDDEN>
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - cobb.liquidweb.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry:
 lawlist|lawlist.com
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21284
Cc: 21284 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Thank you, Marcin, for taking a look at 21284.

I apologize for mislabeling the variable.  It turns out that the same erroneous behavior is observable with Emacs -Q.  The `*Completions*` are in reverse alphabetical order.

Step 1:  Launch the graphical version of Emacs -Q.

Step 2:  M-x eshell

Step 3:  cd to a directory containing files and folders with a variety of different names beginning with letters a to z.

Step 4:  type rm

Step 5:  hit the space bar

Step 6:  hit the tab key

Step 7:  The *Completions* are in reverse alphabetical order.

Thanks,

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

> Hi,
> 
> I tried to reproduce it on GNU Emacs 25.1.50.9 (commit fafdfcb) and
> failed.  However, I'm not sure whether I understood your report
> correctly.  My Emacs doesn't seem to have
> `lawlist-eshell-cmpl-compare-entry-function', only
> `eshell-cmpl-compare-entry-function'.  Did you mean that variable?
> I tried to set it to `'string-lessp', but nothing seemed to change after
> "rm [space] [tab]" in Eshell.
> 
> > Thanks,
> >
> > Keith
> 
> Best,
> 
> -- 
> Marcin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.

Message received at 21284 <at> debbugs.gnu.org:


Received: (at 21284) by debbugs.gnu.org; 4 May 2016 07:40:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 04 03:40:06 2016
Received: from localhost ([127.0.0.1]:36318 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1axrPh-0007aF-Sp
	for submit <at> debbugs.gnu.org; Wed, 04 May 2016 03:40:06 -0400
Received: from mail.mojserwer.eu ([195.110.48.8]:59006)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mbork@HIDDEN>) id 1axrPf-0007a5-Ql
 for 21284 <at> debbugs.gnu.org; Wed, 04 May 2016 03:40:04 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.mojserwer.eu (Postfix) with ESMTP id 28143B32251;
 Wed,  4 May 2016 09:40:03 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu
Received: from mail.mojserwer.eu ([127.0.0.1])
 by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id gP8nwmzI4ani; Wed,  4 May 2016 09:40:00 +0200 (CEST)
Received: from localhost (98-171.echostar.pl [213.156.98.171])
 by mail.mojserwer.eu (Postfix) with ESMTPSA id 88ECCB3224F;
 Wed,  4 May 2016 09:40:00 +0200 (CEST)
From: Marcin Borkowski <mbork@HIDDEN>
To: Keith David Bershatsky <esq@HIDDEN>
Subject: Re: bug#21284: 25.0.50;
 `completion-file-name-table' should/not use `nreverse'?
References: <m2egj1rfnq.wl%esq@HIDDEN>
Date: Wed, 04 May 2016 09:40:00 +0200
In-Reply-To: <m2egj1rfnq.wl%esq@HIDDEN> (Keith David Bershatsky's message
 of "Mon, 17 Aug 2015 10:25:13 -0700")
Message-ID: <87wpnaxodr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21284
Cc: 21284 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 2015-08-17, at 10:25, Keith David Bershatsky <esq@HIDDEN> wrote:

> The function `completion-file-name-table' uses `(setq all (nreverse comp))' instead of `(setq all comp)'.
>
> This has the effect of reversing what was accomplished when `pcomplete-compare-entry-function' is set to `'string-lessp'.
>
> In a nutshell, the completions are in reverse alphabetical order as a result of `(setq all (nreverse comp))'.
>
> This was tested in an eshell buffer by typing at a prompt:  rm [space tab]; and, with `lawlist-eshell-cmpl-compare-entry-function` set to `'string-lessp'.

Hi,

I tried to reproduce it on GNU Emacs 25.1.50.9 (commit fafdfcb) and
failed.  However, I'm not sure whether I understood your report
correctly.  My Emacs doesn't seem to have
`lawlist-eshell-cmpl-compare-entry-function', only
`eshell-cmpl-compare-entry-function'.  Did you mean that variable?
I tried to set it to `'string-lessp', but nothing seemed to change after
"rm [space] [tab]" in Eshell.

> Thanks,
>
> Keith

Best,

-- 
Marcin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Aug 2015 18:07:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 17 14:07:20 2015
Received: from localhost ([127.0.0.1]:58300 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZROoZ-0001op-SF
	for submit <at> debbugs.gnu.org; Mon, 17 Aug 2015 14:07:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47126)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <esq@HIDDEN>) id 1ZROoX-0001oh-QE
 for submit <at> debbugs.gnu.org; Mon, 17 Aug 2015 14:07:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1ZROoR-0005Wr-K2
 for submit <at> debbugs.gnu.org; Mon, 17 Aug 2015 14:07:17 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:33863)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1ZROoR-0005Wg-BJ
 for submit <at> debbugs.gnu.org; Mon, 17 Aug 2015 14:07:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43418)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1ZRO9v-0001Bx-TM
 for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2015 13:25:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1ZRO9r-000149-RE
 for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2015 13:25:19 -0400
Received: from cobb.liquidweb.com ([50.28.13.150]:34703)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1ZRO9r-00012K-Js
 for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2015 13:25:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com;
 s=default; 
 h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date;
 bh=kqslHvK7GE906qF8jN+ZA/ivYdeQ9cJ4A1aP8VBGmbI=; 
 b=lT82n40rZ3P+VZ3FkMSdq97b9tA7zJg2QEkm5YA8wU9pGa5yPel3dgwCcG5M6iPUA8gLXNrrCtQ6W2juRKOkK6uGH9T17935TzPECdUkHsjwLIv3BTvHOlyDjxSQ0/4Y;
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:50794
 helo=server.local.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>) id 1ZRO9p-0005mS-8i
 for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2015 13:25:13 -0400
Date: Mon, 17 Aug 2015 10:25:13 -0700
Message-ID: <m2egj1rfnq.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.0.50; `completion-file-name-table' should/not use `nreverse'?
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - cobb.liquidweb.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry:
 lawlist|lawlist.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

The function `completion-file-name-table' uses `(setq all (nreverse comp))' instead of `(setq all comp)'.

This has the effect of reversing what was accomplished when `pcomplete-compare-entry-function' is set to `'string-lessp'.

In a nutshell, the completions are in reverse alphabetical order as a result of `(setq all (nreverse comp))'.

This was tested in an eshell buffer by typing at a prompt:  rm [space tab]; and, with `lawlist-eshell-cmpl-compare-entry-function` set to `'string-lessp'.

Thanks,

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In GNU Emacs 25.0.50.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549))
 of 2015-08-15 on server.local
Repository revision: 118363 mina86@HIDDEN
Windowing system distributor `Apple', version 10.3.1038
Configured using:
 `configure --with-ns --without-imagemagick'

Configured features:
ACL LIBXML2 ZLIB

Important settings:
  locale-coding-system: utf-8-unix

Major mode: ELISP

Minor modes in effect:
  tb-mode: t
  sb-mode: t
  ml-mode: t
  fl-mode: t
  ds-mode: t
  sd-mode: t
  bc-mode: t
  +-mode: t
  buffer-read-only: t

Recent messages:
Wrote /Users/HOME/.0.data/.0.emacs/.lock
Emacs:  completion-file-name-table

Load-path shadows:
None found.

Features:
(shadow emacsbug sendmail lawlist-ztree lawlist-yas lawlist-ws
lawlist-wl elmo-imap4 elmo-localdir modb-standard modb-legacy
elmo-internal elmo-flag mmelmo-imap mmelmo-buffer elsp-generic mel-u
ps-print ps-def lpr parse-time enriched lawlist-w3m browse-url
doc-view image-mode ccl lawlist-vl lawlist-view lawlist-undo
lawlist-txt lawlist-tm lawlist-tex compare-w lawlist-tabbar
lawlist-speedbar lawlist-shell info esh-groups ehelp ange-ftp
lawlist-sgml lawlist-sb lawlist-saveplace lawlist-ruler mule-util
lawlist-replace lawlist-rectangle lawlist-re-builder lawlist-python
skeleton lawlist-profiler lawlist-print lawlist-php lawlist-perl
lawlist-parens lawlist-org lawlist-calendar org-agenda org org-macro
org-footnote org-pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src
ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs
holidays hol-loaddefs cal-menu calendar cal-loaddefs lawlist-neotree
lawlist-movement lawlist-mouse lawlist-ml lawlist-minibuffer
lawlist-misc lawlist-messages lawlist-mc rect lawlist-markdown
noutline outline lawlist-lorem lawlist-ln lawlist-keymap lawlist-js
lawlist-ispell lawlist-isearch lawlist-imenu lawlist-ibuffer
lawlist-hl lawlist-grep lawlist-git ido view vc-git vc vc-dispatcher
url-http tls url url-proxy url-privacy url-expand url-methods
url-history mailcap url-auth url-cookie url-domsuf url-gw thingatpt
time-stamp server log-view log-edit message mml mml-sec mm-decode
mm-bodies mm-encode gmm-utils mailheader pcvs-util add-log
lawlist-help quail help-mode json grep compile find-lisp ediff-merg
ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util
ediff ert find-func ewoc eieio-base diff-mode conf-mode autorevert
filenotify lawlist-frame lawlist-frame-bufs lawlist-font-lock
lawlist-fm lawlist-env lawlist-elscreen lawlist-elisp lawlist-dv
jka-compr lawlist-image lawlist-files zeroconf url-util url-parse
auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv
eieio-core password-cache url-vars dbus xml lawlist-ds lawlist-dired
epa epg epg-config format-spec edmacro kmacro dired lawlist-desktop
frameset lawlist-debug lawlist-window debug lawlist-css smie
lawlist-compile rx lawlist-color lawlist-cm pcase lawlist-cc cc-langs
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs cc-bytecomp lawlist-calc lawlist-calccomp
lawlist-calcalg3 lawlist-calcalg2 lawlist-calc+ easymenu lawlist-bk
lawlist-bc lawlist-bbdb gnus gnus-ems nnheader gnus-util mail-utils
wid-edit mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mailabbrev mail-extr rfc822 cl timezone lawlist-as
lawlist-archive cl-macs gv cl-loaddefs cl-lib lawlist-+ disp-table
easy-mmode derived advice help-fns shell pcomplete comint ansi-color
ring savehist time-date tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 2078627 153097)
 (symbols 48 83114 0)
 (miscs 40 560 467)
 (strings 32 191705 23218)
 (string-bytes 1 6865927)
 (vectors 16 40524)
 (vector-slots 8 960694 10088)
 (floats 8 2574 897)
 (intervals 56 730 61)
 (buffers 976 12))




Acknowledgement sent to Keith David Bershatsky <esq@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#21284; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 2 Apr 2017 05:30:02 UTC

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