--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 410B0431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 14:12:30 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 1xCyWNCxVx8T for <notmuch@notmuchmail.org>;\r
+ Wed, 25 Jul 2012 14:12:29 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id E371D431FAE\r
+ for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 14:12:28 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1Su8sc-00019z-T0; Wed, 25 Jul 2012 22:12:27 +0100\r
+Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
+ helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1Su8sc-0000mJ-GL; Wed, 25 Jul 2012 22:12:26 +0100\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/5] emacs: compile and load notmuch-pick.el if present.\r
+In-Reply-To: <m2ipdcqjwj.fsf@guru.guru-group.fi>\r
+References: <1343164911-31589-1-git-send-email-markwalters1009@gmail.com>\r
+ <1343164911-31589-2-git-send-email-markwalters1009@gmail.com>\r
+ <m2ipdcqjwj.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.13.2+93~gf33b188 (http://notmuchmail.org) Emacs/23.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Wed, 25 Jul 2012 22:12:27 +0100\r
+Message-ID: <87fw8fsfyc.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: 87ad75fb37111fc9889f7383785aea23 (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.8\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored -1.8 points.\r
+ Summary of the scoring: \r
+ * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+ * medium trust\r
+ * [138.37.6.40 listed in list.dnswl.org]\r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+ * domain\r
+ * 0.5 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 25 Jul 2012 21:12:30 -0000\r
+\r
+On Wed, 25 Jul 2012, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> On Wed, Jul 25 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
+>\r
+>> Compile and load notmuch-pick.el if present.\r
+>>\r
+>> All the actual setup of pick is done in the function notmuch-pick-init\r
+>> so we call that in the notmuch init function if it is bound. This\r
+>> function will setup all extra keybinding etc.\r
+>\r
+> Great stuff! See a few thoughts below...\r
+\r
+Thanks for these: I think they are all clear improvements.\r
+\r
+>\r
+>> ---\r
+>> emacs/Makefile.local | 3 ++-\r
+>> emacs/notmuch.el | 5 +++++\r
+>> 2 files changed, 7 insertions(+), 1 deletions(-)\r
+>>\r
+>> diff --git a/emacs/Makefile.local b/emacs/Makefile.local\r
+>> index fb82247..9f4dba6 100644\r
+>> --- a/emacs/Makefile.local\r
+>> +++ b/emacs/Makefile.local\r
+>> @@ -15,7 +15,8 @@ emacs_sources := \\r
+>> $(dir)/notmuch-crypto.el \\r
+>> $(dir)/notmuch-tag.el \\r
+>> $(dir)/coolj.el \\r
+>> - $(dir)/notmuch-print.el\r
+>> + $(dir)/notmuch-print.el \\r
+>> + $(wildcard $(dir)/notmuch-pick.el)\r
+>\r
+> I wonder whether having this conditional is good idea. What if\r
+> someone copies (or (sym)links) notmuch-pick.el there and then\r
+> compiles and takes to use. Next time he takes clean tree and\r
+> forgets to do this copying and installs to the same destination.\r
+> Now there is old notmuch-pick.elc which might be out of sync.\r
+>\r
+> I think it would be better to provide a shell script in \r
+> notmuch-pick directory which byte-compiles and installs notmuch-pick\r
+> in case user wants to install/update notmuch-pick. Whenever notmuch-pick\r
+> is good enough to be shipped inside $(dir) above then the aboce conditional\r
+> is not needed (at all).\r
+>\r
+\r
+I have now done this: I actually use a Makefile so that I can pick up\r
+the config from notmuch: in particular the install directory\r
+for the notmuch-pick.elc file. Does that seem reasonable?\r
+\r
+\r
+>> emacs_images := \\r
+>> $(srcdir)/$(dir)/notmuch-logo.png\r
+>> diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+>> index fd1836f..4f3da4f 100644\r
+>> --- a/emacs/notmuch.el\r
+>> +++ b/emacs/notmuch.el\r
+>> @@ -59,6 +59,9 @@\r
+>> (require 'notmuch-maildir-fcc)\r
+>> (require 'notmuch-message)\r
+>> \r
+>> +;; Load notmuch-pick if available (but do not error if not present).\r
+>> +(load "notmuch-pick" t)\r
+>> +\r
+>> (defcustom notmuch-search-result-format\r
+>> `(("date" . "%12s ")\r
+>> ("count" . "%-7s ")\r
+>> @@ -1088,6 +1091,8 @@ current search results AND that are tagged with the given tag."\r
+>> (defun notmuch ()\r
+>> "Run notmuch and display saved searches, known tags, etc."\r
+>> (interactive)\r
+>> + (when (fboundp 'notmuch-pick-init)\r
+>> + (notmuch-pick-init))\r
+>> (notmuch-hello))\r
+>\r
+> Instead of this could notmuch-pick.el contain:\r
+>\r
+> In the beginning:\r
+>\r
+> (require 'notmuch-hello)\r
+> (require 'notmuch-show)\r
+> (require 'notmuch) ;; XXX ATM, as notmuch-search-mode-map is defined here\r
+>\r
+> And, at the end, before (provide 'notmuch-pick), execute the lines\r
+> what currenty are contained in (notmuch-pick-init).\r
+>\r
+> Then, those who want to start using notmuch-pick at this time\r
+> can (just) write the following in their .emacs:\r
+>\r
+> (require 'notmuch)\r
+> (require 'notmuch-pick)\r
+\r
+This works very nicely. And if we want a transitional period the\r
+notmuch-pick could be in (dir) but not loaded automatically.\r
+\r
+Many thanks for the excellent suggestions.\r
+\r
+Mark\r