[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25995: 26.0.50; Mismatch between documented and actual behaviour of
From: |
npostavs |
Subject: |
bug#25995: 26.0.50; Mismatch between documented and actual behaviour of icomplete |
Date: |
Thu, 09 Mar 2017 18:25:21 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
tags 25995 confirmed
quit
Alexis <flexibeast@gmail.com> writes:
> * Create a test directory containing three files: '1', '2', '3'.
>
> * Change to that directory and run emacs -Q.
>
> * M-x icomplete-mode
>
> * C-x C-f
>
> * C-j
>
> Section 19.7.2 of the Emacs manual states:
>
> "At any time, you can type ‘C-j’ to select the first completion in the
> list."
>
> Reading left-to-right, '1' is the first item in the list. So C-j
> should visit that file. Instead, it visits '3'.
This seems to have been introduced by [1: 65797b1]. I guess
completion-pcm--filename-try-filter should not reverse its input?
1: 2016-04-28 19:31:43 +0200 65797b1d75e9f608ffd50fd88be47a854b143bb1
Make icomplete respect `completion-ignored-extensions'
--- i/lisp/minibuffer.el
+++ w/lisp/minibuffer.el
@@ -3257,7 +3257,7 @@ completion-pcm--filename-try-filter
"\\)\\'")))
(dolist (f all)
(unless (string-match-p re f) (push f try)))
- (or try all))))
+ (or (nreverse try) all))))
(defun completion-pcm--merge-try (pattern all prefix suffix)