GNU bug report logs - #16334
24.3.50; company-capf eats the first char in IELM filename completions

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16334 <at> debbugs.gnu.org
Subject: bug#16334: 24.3.50; company-capf eats the first char in IELM filename completions
Date: Sun, 05 Jan 2014 06:20:58 +0400
On 04.01.2014 09:00, Stefan Monnier wrote:
> That's normal.  Try C-x C-f / TAB TAB and you'll see that the leading /
> is also "missing" in the *Completions* buffer.
> ...
> 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'.

Thanks, I didn't know about that.

> Ideally, Company should be extended to handle this feature,

It's not hard to do, but are you sure it would be a good addition to the 
API? "Completion prefix" and "completion bounds" are easy to mix up, and 
from what I see in various completion mechanisms, the non-simple 
completion tables more often need to look at the whole buffer before 
point, or at least a large chunk of it.

`completion-file-name-table' is more of an exception, I think. But if it 
was only passed the segment of STRING after the last path separator, it 
could still look behind it in the buffer and see the full path.

> but for now that can be handled in company-capf.

Ok, I'll try.




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.