unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24676: 25.1; `completion-pcm-all-completions' should not reverse order of candidates
@ 2016-10-12 16:56 Drew Adams
  2016-10-17  8:19 ` Michael Heerdegen
  2016-10-17 16:29 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Drew Adams @ 2016-10-12 16:56 UTC (permalink / raw)
  To: 24676

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))) ; <==== 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=-static'





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

end of thread, other threads:[~2016-10-18 14:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-12 16:56 bug#24676: 25.1; `completion-pcm-all-completions' should not reverse order of candidates Drew Adams
2016-10-17  8:19 ` Michael Heerdegen
2016-10-17 16:29 ` Stefan Monnier
2016-10-18  8:11   ` Michael Heerdegen
2016-10-18 13:56     ` Drew Adams
2016-10-18 14:22       ` Michael Heerdegen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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