From df3abbee8ebe3938bbfc4bb78c6db3ca15a26f0f Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 5 Sep 2014 16:29:56 +0100 Subject: [PATCH] Re: [PATCH v1 0/3] Address completion entirely in elisp. --- 75/f67391208a15e3c735d98de957ad861840a0da | 139 ++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 75/f67391208a15e3c735d98de957ad861840a0da diff --git a/75/f67391208a15e3c735d98de957ad861840a0da b/75/f67391208a15e3c735d98de957ad861840a0da new file mode 100644 index 000000000..f591c3874 --- /dev/null +++ b/75/f67391208a15e3c735d98de957ad861840a0da @@ -0,0 +1,139 @@ +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 0EE20431FB6 + for ; Fri, 5 Sep 2014 08:30:34 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.502 +X-Spam-Level: +X-Spam-Status: No, score=0.502 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_LOW=-0.7] 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 xx1MspmQVTBf for ; + Fri, 5 Sep 2014 08:30:22 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id CCDF2431FAF + for ; Fri, 5 Sep 2014 08:30:21 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1XPvSZ-0002MZ-84; Fri, 05 Sep 2014 16:30:19 +0100 +Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1XPvSY-0006RL-Rl; Fri, 05 Sep 2014 16:29:59 +0100 +From: Mark Walters +To: David Edmondson , notmuch@notmuchmail.org +Subject: Re: [PATCH v1 0/3] Address completion entirely in elisp. +In-Reply-To: <1409921969-65129-1-git-send-email-dme@dme.org> +References: <1409921969-65129-1-git-send-email-dme@dme.org> +User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 05 Sep 2014 16:29:56 +0100 +Message-ID: <87k35igk5n.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain +X-Sender-Host-Address: 87.81.223.162 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: fbafcd9f345a98812e30cb8ac0f047e8 (of first 20000 bytes) +X-SpamAssassin-Score: -0.1 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -0.1 points. + Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.1 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +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: Fri, 05 Sep 2014 15:30:34 -0000 + + +Hi + +On Fri, 05 Sep 2014, David Edmondson wrote: +> Address completion entirely in elisp. +> +> I grew frustrated with having to use an external command to provide +> address completion, as they all had annoyances (up front scanning, +> requiring python bindings, etc.). This is an attempt to provide +> something similar to jkr's notmuch-addresses.py (which I was +> previously using) entirely in elisp, relying only on the `notmuch' +> command. + +Just a few quick comments: the first is relevant to others trying this +patch. + +1) You seem to be missing a (require 'std11) somewhere. I did this via M-: +and then it ran fine. + +2) It is not quick on a spinning rust disk. This may not be relevant as +the delay is probably notmuch so would also be the case if I were using +notmuch-addresses.py (i normally just use a trivial script that parses +my .mailrc) + +3) Have you tried +id:1407771091-12651-1-git-send-email-sojkam1@fel.cvut.cz and do you have +any comments on the comparison? + +4) Finally, I wonder if we would be worth approaching the backend +notmuch use slightly differently: if we added a +notmuch_messages_collect_from function which was very similar to +notmuch_messages_collect_tags, and added a corresponding --output=from +to notmuch search then you would get the information you need very +quickly. I think it might be a lot faster as I think the from header is +stored in the database but some other headers are not, so that the +current method the show --body=false needs to look at the actually +messages + +I should emphasise that none of the above means I am opposed to the +patch: having respectable built in address-completion support would be +very nice. + +Best wishes + +Mark + + + + +> +> +> David Edmondson (3): +> emacs: Allow query to exclude the entire thread and body. +> emacs: Add `notmuch-user-all-email'. +> emacs: Add an address completer in elisp. +> +> emacs/notmuch-address.el | 49 +++++++++++++++++++++++++++++++++++++++++++----- +> emacs/notmuch-lib.el | 4 ++++ +> emacs/notmuch-query.el | 7 ++++++- +> 3 files changed, 54 insertions(+), 6 deletions(-) +> +> -- +> 1.8.5.2 (Apple Git-48) +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2