Re: [PATCH v3] Emacs: Add address completion mechanism implemented in elisp

Subject: Re: [PATCH v3] Emacs: Add address completion mechanism implemented in elisp

Date: Sun, 17 Aug 2014 12:01:35 +0200

To: notmuch@notmuchmail.org

Cc:

From: Michal Sojka


On 11.8.2014 17:31, Michal Sojka wrote:
> Currently, notmuch has an address completion mechanism that requires
> external command to provide completion candidates. This patch adds a
> completion mechanism inspired by https://github.com/tjim/nevermore,
> which is implemented in Emacs lisp only.
>
> The core of the new mechanism is the function notmuch-address-harvest
> that collects the completion candidates from the notmuch database and
> stores them in notmuch-address-completions variable.
> notmuch-address-harvest is called on the first entry to message-mode
> and runs asychnornously so that the user doesn't have to wait for it
> to complete while composing the message. The
> notmuch-address-completions variable is used in message-mode as a
> source of completion candidates. Currently, there are two ways how the
> notmuch-address-completions variable is used.
This patch will need to be improved. I have just performed experiments 
on a system with rotating harddisk and the initial address harvesting 
takes about a minute (on SSD it's 6 seconds). This basically means that 
when writing a first message, address completion does not know about 
most completions candidates.

Probably, first invocation of address harvesting should take into 
account the initial text and search only for addresses matching this 
text. I'll try to implement this later.

-Michal

Thread: