unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexander Adolf <alexander.adolf@condition-alpha.com>
To: emacs-devel@gnu.org
Subject: [ELPA] New package: company-eudc
Date: Fri, 30 Apr 2021 16:19:20 +0200	[thread overview]
Message-ID: <2aaed91801ff892a269a315c50064d99@condition-alpha.com> (raw)

Dear Emacs Developers,

I would kindly like to propose my new package company-eudc.el for
inclusion into ELPA. Here is an excerpt from the package's home page at
https://github.com/condition-alpha/company-eudc :

----------------------------------------------------------------------
What This Package Does

company-mode in conjunction with yasnippet makes composing emails a
breeze. Where things fall short, is the completion of email addresses,
however. Some Emacs MUA packages feed the addresses of emails in your
archive into the completion system. But what about those in your
contacts app, or those on the LDAP directory of your organisation?

The Emacs Unified Directory Client (EUDC), which is part of core Emacs,
can make information from your contacts app, or from LDAP servers
available. But there is no way of getting these to be presented as
completion candidates in company-mode.

company-eudc closes this gap by implementing a comapny back-end, that
retrieves names and email addresses from EUDC.


Limited Completion Scope

company-eudc will only provide completion candidates if, and only if,
all of the following apply:

1. the major mode of the current buffer is message-mode, or a derived
   mode (e.g. notmuch-message-mode);

2. the cursor is on the line of a message header field that requires one
   or more email addresses (From, To, Cc, Bcc, or Reply-to).

This prevents most likely useless completion proposals with email
addresses when typing names in the body of an email message ("Dear John,
..."), or in non email related modes.


Query Semantics

To assemble the query string, company-eudc collects all text preceding
the cursor, which is not part of the header field label, or another
email address. This means that you can e.g. type "John Smith", invoke
company-eudc-expand-inline, and "John Smith" will be passed to EUDC as
the query string. How EUDC handles multi-word queries is controlled by
the EUDC variable eudc-inline-query-format (which see).
----------------------------------------------------------------------

I have created an account on savannah.gnu.org yesterday (and am of
course not member of any projects there yet). I am subscribed to both,
emacs-devel@gnu.org, and bug-gnu-emacs@gnu.org. I have also signed a
copyright assignment form for everything Emacs (rt.gnu.org #1503473).


Many thanks and looking forward to your thoughts,

  --alexander



             reply	other threads:[~2021-04-30 14:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 14:19 Alexander Adolf [this message]
2021-04-30 17:30 ` [ELPA] New package: company-eudc Stefan Monnier
2021-05-03 15:52   ` Alexander Adolf
2021-05-03 23:54     ` Stefan Monnier
2021-05-05 19:47       ` Alexander Adolf
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=2aaed91801ff892a269a315c50064d99@condition-alpha.com \
    --to=alexander.adolf@condition-alpha.com \
    --cc=emacs-devel@gnu.org \
    /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).