emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] New package: company-eudc


From: Alexander Adolf
Subject: Re: [ELPA] New package: company-eudc
Date: Wed, 05 May 2021 21:47:49 +0200

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> [...]
>>> I like this functionality, but:
>>> - Why not add this directly to the EUDC code in Emacs itself?
>> I did propose it to the company maintainers, but it didn't fall on
>> fertile ground there.
>
> Hmm... not sure I understand.  I was proposing to add it to the EUDC
> code in Emacs (e.g. `eudc.el`), not to the Company package.

EUDC does not contain any adapters/back-ends for other packages. And it
would have seemed odd to me, if a basic package contained code to adapt
itself to another package, which builds on top of itself.

>>> - Why make it a Company backend instead of a CAPF function (since
>>>   Company knows how to use CAPF functions as well)?
>>> [...]
>> That's one of the next things on my to-do list. ;-)
>
> I think it would make a lot of sense to add such a CAPF directly to
> `eudc.el`, and then to hook it into `message.el`.

Agreed; that's the plan (adding a new function to EUDC, which in turn
can be added to `completion-at-point-functions`).

> I must admit, I don't know where `company-eudc-expand-inline` would end
> up in that scenario, tho :-(
> [...]

Indeed; `company-eudc-expand-inline` is to cater for the particularity
of EUDC queries potentially taking very long. I have yet to research
whether CAPF has a similar function to start completion with a single,
specific back-end only, and which can be bound to a key. A `let`
statement shadowing `completion-at-point-functions` could be a (slightly
hacky though) way of achieving this.

Another issue to solve (showing off my lack of knowledge of CAPF here)
is providing the EUDC suggestions in suitable message header fields
only.

I'll need to scratch my head a bit more over these, and possibly further
things, I guess.


Cheers,

  --alexander



reply via email to

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