GNU bug report logs - #25995
26.0.50; Mismatch between documented and actual behaviour of icomplete

Previous Next

Package: emacs;

Reported by: Alexis <flexibeast <at> gmail.com>

Date: Mon, 6 Mar 2017 11:13:01 UTC

Severity: minor

Tags: confirmed, fixed

Found in version 26.0.50

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: npostavs <at> users.sourceforge.net, Alexis <flexibeast <at> gmail.com>
Cc: 25995 <at> debbugs.gnu.org
Subject: bug#25995: 26.0.50; Mismatch between documented and actual behaviour of icomplete
Date: Mon, 19 Jun 2017 03:19:16 +0300
On 3/10/17 1:25 AM, npostavs <at> users.sourceforge.net wrote:

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

Looks good to me, thank you.

But what are the chances of this 'nreverse' (or the whole function) 
being performance-significant?

Maybe we could switch this code to `cl-delete-if'. From my testing, it's 
considerably faster than dolist+push (even without nreverse).




This bug report was last modified 8 years and 64 days ago.

Previous Next


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