From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#24676: 25.1; `completion-pcm-all-completions' should not reverse order of candidates Date: Wed, 12 Oct 2016 09:56:32 -0700 (PDT) Message-ID: <39f09e8d-8381-4176-917e-35cf12a9ae90@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1476291443 16436 195.159.176.226 (12 Oct 2016 16:57:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2016 16:57:23 +0000 (UTC) To: 24676@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 12 18:57:19 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buMqA-0003Dl-19 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 18:57:14 +0200 Original-Received: from localhost ([::1]:34784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buMq8-0006e5-QQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 12:57:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buMq2-0006dz-UG for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 12:57:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buMpx-0002YQ-Vy for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 12:57:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buMpx-0002YL-SL for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 12:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1buMpx-0003oB-NX for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 12:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Oct 2016 16:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24676 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147629141214623 (code B ref -1); Wed, 12 Oct 2016 16:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Oct 2016 16:56:52 +0000 Original-Received: from localhost ([127.0.0.1]:53264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buMpn-0003nl-UJ for submit@debbugs.gnu.org; Wed, 12 Oct 2016 12:56:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buMpm-0003nZ-2Z for submit@debbugs.gnu.org; Wed, 12 Oct 2016 12:56:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buMpf-0002Rz-Pb for submit@debbugs.gnu.org; Wed, 12 Oct 2016 12:56:44 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:55172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buMpf-0002Rk-IY for submit@debbugs.gnu.org; Wed, 12 Oct 2016 12:56:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buMpb-0006b4-Vr for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 12:56:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buMpX-0002ME-3z for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 12:56:39 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:29790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buMpW-0002LG-QW for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 12:56:35 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u9CGuXUX013690 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Oct 2016 16:56:33 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u9CGuXJL017448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Oct 2016 16:56:33 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u9CGuXvp018993 for ; Wed, 12 Oct 2016 16:56:33 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124398 Archived-At: Because of this part, at the end of the function, `completion-pcm-all-completions' reverses the order of the candidates. (let ((poss ())) (dolist (c compl) (when (string-match-p regex c) (push c poss))) ; <=3D=3D=3D=3D reverses poss) It should not do this. Users should be able to depend on whatever order the candidates are already in (as returned by `all-completions'). For example, for buffer candidates, the default order from `all-completions' is last-display-time order. The fix is trivial: (let ((poss ())) (dolist (c compl) (when (string-match-p regex c) (push c poss))) (nreverse poss)) In GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --without-dbus --without-compress-install CFLAGS=3D-static'