GNU bug report logs -
#39484
26.3; try-completion bug
Previous Next
Reported by: Wanrong Lin <wrglin <at> gmail.com>
Date: Fri, 7 Feb 2020 15:46:02 UTC
Severity: normal
Found in version 26.3
Fixed in version 29.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
> The examples I gave are real life situations.
All the examples I see are of the "abcd" or "xyz", i.e. made up examples.
I understand they are meant to illustrate real-life examples, but they
are not themselves real life.
> 1. x is a prefix of y, ignoring case.
> 2. y is the maximum common prefix, ignoring case, among all candidates
That's what is guaranteed by the semantics, so our code already does
that (barring bugs).
> 3. y is the *exact* (including case) prefix of at least one of the
> candidates
We could try that, indeed. It still satisfies the constraint
I described as "conservative", and it wouldn't cost extra
efforts either.
If someone wants to try that, feel free to do so, but I personally would
prefer if we only do that when all the matching candidates agree on
the capitalization.
BTW, we currently have the following tests in test/src/minibuffer-tests.el:
(ert-deftest test-try-completion-ignore-case ()
(let ((completion-ignore-case t))
(should (equal (try-completion "bar" '("bAr" "barfoo")) "bAr"))
(should (equal (try-completion "bar" '("bArfoo" "barbaz")) "bar"))
(should (equal (try-completion "bar" '("bArfoo" "barbaz"))
(try-completion "bar" '("barbaz" "bArfoo"))))
;; bug#11339
(should (equal (try-completion "baz" '("baz" "bAz")) "baz")) ;And not `t'!
(should (equal (try-completion "baz" '("bAz" "baz"))
(try-completion "baz" '("baz" "bAz"))))))
-- Stefan
This bug report was last modified 3 years and 110 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.