GNU bug report logs -
#24676
25.1; `completion-pcm-all-completions' should not reverse order of candidates
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Wed, 12 Oct 2016 16:57:01 UTC
Severity: minor
Tags: fixed
Merged with 26313
Found in version 25.1
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello,
> 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))
Ah, this is the reason for the candidate list reversion I see. Yes,
this should IMO not happen.
Stefan, if you get the time, can you please have a look at whether the
suggested fix looks ok to you, and commit it if applicable?
Thanks,
Michael.
This bug report was last modified 8 years and 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.