GNU bug report logs - #42149
Substring and flex completion ignore implicit trailing ‘any’

Previous Next

Package: emacs;

Reported by: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>

Date: Wed, 1 Jul 2020 10:41:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: João Távora <joaotavora <at> gmail.com>
Cc: 42149 <at> debbugs.gnu.org, Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Subject: bug#42149: Substring and flex completion ignore implicit trailing ‘any’
Date: Mon, 28 Dec 2020 11:03:54 -0500
> This is one of them.
>
>     (ert-deftest completion-pcm-test-3 ()
>       ;; Full match!
>       (should (eql
>                (completion--pcm-score
>                 (car (completion-pcm-all-completions
>                       "R" '("R" "hello") nil 1)))
>                1.0)))

BTW, a good improvement to the tests would be to replace the score
equality tests with score ordering comparisons (like "score of foo >
score of bar") since it'd be perfectly OK to use a different scoring
system which gives different values as long as the relative ordering is
still obeyed.


        Stefan





This bug report was last modified 4 years and 7 days ago.

Previous Next


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