bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16334: 24.3.50; company-capf eats the first char in IELM filename co


From: Dmitry Gutov
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]