GNU bug report logs -
#16334
24.3.50; company-capf eats the first char in IELM filename completions
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Fri, 3 Jan 2014 23:21:02 UTC
Severity: normal
Found in version 24.3.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 16334 <at> debbugs.gnu.org (full text, mbox):
> 1. Open an IELM buffer and (on Unix) type `"/' there.
> 2. Leave the point after `/'.
> 3. Type `M-x company-capf', see that all candidates have the first
> character missing.
That's normal. Try C-x C-f / TAB TAB and you'll see that the leading /
is also "missing" in the *Completions* buffer.
> Not sure how `completion-at-point' ignores that problem.
It doesn't ignore the problem. It knows that (all-completions STR
TABLE) doesn't always return strings that have STR as a prefix and
spends a fair bit of effort handling it right.
> 5. Type `/usr/', then `M-x company-capf', see an error caused by some
> candidates being shorter than the prefix.
Indeed, Company can't handle all completion-at-point-functions so far
because it assumes all completion tables are "simple", unlike
for example filename completion.
You can know how many chars are "missing" by calling
`completion-boundaries'. Ideally, Company should be extended to handle
this feature, but for now that can be handled in company-capf.
Stefan
This bug report was last modified 11 years and 138 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.