From 6c7a77761ccfc1a9fa2f118ec92e61187126e5c2 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 11 Aug 2014 16:31:06 +0200 Subject: [PATCH] Re: [PATCH RFC] Emacs: Add address completion mechanism implemented in elisp --- 0f/2118d935db6dcc43be301baf1f12bf6799d224 | 115 ++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 0f/2118d935db6dcc43be301baf1f12bf6799d224 diff --git a/0f/2118d935db6dcc43be301baf1f12bf6799d224 b/0f/2118d935db6dcc43be301baf1f12bf6799d224 new file mode 100644 index 000000000..4a4982ada --- /dev/null +++ b/0f/2118d935db6dcc43be301baf1f12bf6799d224 @@ -0,0 +1,115 @@ +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 38682431FB6 + for ; Mon, 11 Aug 2014 07:31:22 -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 YlG-dNLG3li8 for ; + Mon, 11 Aug 2014 07:31:15 -0700 (PDT) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id E95F0431FAF + for ; Mon, 11 Aug 2014 07:31:14 -0700 (PDT) +Received: from localhost (unknown [192.168.200.7]) + by max.feld.cvut.cz (Postfix) with ESMTP id 7919C3CFE93; + Mon, 11 Aug 2014 16:31:13 +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 xcj5BcSPvWfB; Mon, 11 Aug 2014 16:31:08 +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 1CC0B3CFE89; + Mon, 11 Aug 2014 16:31:07 +0200 (CEST) +Received: from wsh by steelpick.2x.cz with local (Exim 4.82_1-5b7a7c0-XX) + (envelope-from ) + id 1XGqcs-00081A-Qm; Mon, 11 Aug 2014 16:31:06 +0200 +From: Michal Sojka +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH RFC] Emacs: Add address completion mechanism implemented + in elisp +In-Reply-To: <87r411f604.fsf@maritornes.cs.unb.ca> +References: <87bns8f6hi.fsf@steelpick.2x.cz> + <1406653070-13174-1-git-send-email-sojkam1@fel.cvut.cz> + <87r411f604.fsf@maritornes.cs.unb.ca> +User-Agent: Notmuch/0.18.1+57~gbabacd5 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Mon, 11 Aug 2014 16:31:06 +0200 +Message-ID: <87r40np07p.fsf@steelpick.2x.cz> +MIME-Version: 1.0 +Content-Type: text/plain +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: Mon, 11 Aug 2014 14:31:22 -0000 + +Hi David, + +On Fri, Aug 01 2014, David Bremner wrote: +> Michal Sojka writes: +> +>> notmuch-company.el hooks itself into message-mode and uses +>> company-mode to offer the completion to the user. The file is put into +>> the contrib directory which means that the use has to install it +>> himself. This is because company-mode is not a part of Emacs and +>> bytecompiling notmuch-company.el fails due to used --quick option that +>> causes user installed packages to be ignored. +> +> what about for now just putting +> +> ;; -*-no-byte-compile: t; -*- +> +> at the top of the file? It seems usable uncompiled to me. +> +> Then somebody who really wants it compiled can figure out how to do the +> conditional compilation. +> +>> It would probably make sense to implement another completion frontend +>> based only on Emacs built-in functionality and integrate it with +>> notmuch-addresses.el. +> +> Agreed. +> +>> + "`company-mode' completion back-end for `nevermore (nm)'." +> +> missed "nevermore" ;) +> +> +>> +>> +(defun notmuch-flatten-thread-set (thread-set) +>> + "Convert the result of 'notmuch show' to the plain list of messages." +>> +(defun notmuch-flatten-thread (thread) +>> + +>> +(defun notmuch-flatten-thread-node (thread-node) +> +> +> what about putting those functions in notmuch-query.el? +> +> +>> +(defun notmuch-async-harvest () +>> + "Collect possible addresses for completion. It queries the +> +> +> logically it seems like this might belong in notmuch-address.el, +> even if none of the functions in in it currently use + +Thanks for the comments. I incorporated them in a new version of the +patch, which I'll send in a while. + +-Michal -- 2.26.2