Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 067F7431FBD for ; Sun, 17 Aug 2014 03:02:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZzOcCSvFHsYW for ; Sun, 17 Aug 2014 03:01:53 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 9AE5A431FBC for ; Sun, 17 Aug 2014 03:01:53 -0700 (PDT) Received: from localhost (unknown [192.168.200.7]) by max.feld.cvut.cz (Postfix) with ESMTP id 137F919F33C1; Sun, 17 Aug 2014 12:01:49 +0200 (CEST) X-Virus-Scanned: IMAP STYX AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044) with ESMTP id T8_vnmWa0lLV; Sun, 17 Aug 2014 12:01:45 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 9C3F019F33CC; Sun, 17 Aug 2014 12:01:43 +0200 (CEST) Message-ID: <53F07D7F.9080006@fel.cvut.cz> Date: Sun, 17 Aug 2014 12:01:35 +0200 From: Michal Sojka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0 MIME-Version: 1.0 To: notmuch@notmuchmail.org Subject: Re: [PATCH v3] Emacs: Add address completion mechanism implemented in elisp References: <1407771091-12651-1-git-send-email-sojkam1@fel.cvut.cz> In-Reply-To: <1407771091-12651-1-git-send-email-sojkam1@fel.cvut.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 10:02:03 -0000 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