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
Message #35 received at 39484 <at> debbugs.gnu.org (full text, mbox):
I just tried this in Emacs 26.3:
(let ((completion-ignore-case t))
(try-completion "abc" '("Abcde" "aBcdf" "abCdg"))) -> "Abcd"
The answer is not bad, matching at least one of the candidates. That
makes the answer to my original example even more odd:
(let ((completion-ignore-case t))
(try-completion "xyz" '("XyzD" "XyzAbc"))
)
==> "xyz"
Why does it matter whether any additional chars follow the user input in
the match?
Wanrong
On 10/27/2020 8:47 PM, Wanrong Lin wrote:
> Sorry, I meant "abcd" as the answer for your example.
>
> On 10/27/2020 8:44 PM, Wanrong Lin wrote:
>> For this case, "abc" might be OK, unless you think there is another
>> better answer. But in the example I gave, don't you think "Xyz" is
>> obviously a better answer than "xyz"?
>>
>> The argument here is for some examples, the function does not return
>> the best answer, and also, does not seem to be consistent to me (for
>> those two examples I gave). There might be a reason behind this
>> "compromise", or, it might be just an arbitrary decision as
>> documented in the comments you gave. If it is the latter, can we
>> improve on it? I think those are valid questions.
>>
>> Wanrong
>>
>> On 10/27/2020 5:21 PM, Andreas Schwab wrote:
>>> So what should (try-completion "abc" '("Abcde" "aBcdf" "abCdg"))
>>> return?
>>>
>>> Andreas.
>>>
>>
>
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.