unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexander Adolf <alexander.adolf@condition-alpha.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: company-eudc
Date: Wed, 05 May 2021 21:47:49 +0200	[thread overview]
Message-ID: <bc0ee13250b16a17685c45cd5f8e4394@condition-alpha.com> (raw)
In-Reply-To: <jwvtunjpevg.fsf-monnier+emacs@gnu.org>


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	other threads:[~2021-05-05 19:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 14:19 [ELPA] New package: company-eudc Alexander Adolf
2021-04-30 17:30 ` Stefan Monnier
2021-05-03 15:52   ` Alexander Adolf
2021-05-03 23:54     ` Stefan Monnier
2021-05-05 19:47       ` Alexander Adolf [this message]
2021-05-05 20:36         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc0ee13250b16a17685c45cd5f8e4394@condition-alpha.com \
    --to=alexander.adolf@condition-alpha.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).