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 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 \
    --subject='Re: [ELPA] New package: company-eudc' \
    /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

unofficial mirror of emacs-devel@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/emacs-devel/0 emacs-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 emacs-devel emacs-devel/ https://yhetil.org/emacs-devel \
		emacs-devel@gnu.org
	public-inbox-index emacs-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.devel
	nntp://news.gmane.io/gmane.emacs.devel


code repositories for project(s) associated with this inbox:

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

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git