[PATCH] emacs: convert notmuch-address-harvester to use notmuch-address
authorDavid Bremner <david@tethera.net>
Sat, 17 Jan 2015 13:57:11 +0000 (14:57 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:47:28 +0000 (14:47 -0700)
e8/d0e262b936d95ee98c3b411c8a8b419e906362 [new file with mode: 0644]

diff --git a/e8/d0e262b936d95ee98c3b411c8a8b419e906362 b/e8/d0e262b936d95ee98c3b411c8a8b419e906362
new file mode 100644 (file)
index 0000000..e1af566
--- /dev/null
@@ -0,0 +1,76 @@
+Return-Path: <bremner@tesseract.cs.unb.ca>\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 1F8BD431FC2\r
+       for <notmuch@notmuchmail.org>; Sat, 17 Jan 2015 05:57:57 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.438\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
+       tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 6XSzivOXMy8i for <notmuch@notmuchmail.org>;\r
+       Sat, 17 Jan 2015 05:57:21 -0800 (PST)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 9D5C9431FAF\r
+       for <notmuch@notmuchmail.org>; Sat, 17 Jan 2015 05:57:21 -0800 (PST)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+       (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+       id 1YCTsO-0007MH-AI; Sat, 17 Jan 2015 09:57:20 -0400\r
+Received: (nullmailer pid 25910 invoked by uid 1000); Sat, 17 Jan 2015\r
+       13:57:15 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: convert notmuch-address-harvester to use\r
+       notmuch-address\r
+Date: Sat, 17 Jan 2015 14:57:11 +0100\r
+Message-Id: <1421503031-25797-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1411150602-21892-3-git-send-email-sojkam1@fel.cvut.cz>\r
+References: <1411150602-21892-3-git-send-email-sojkam1@fel.cvut.cz>\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: Sat, 17 Jan 2015 13:57:57 -0000\r
+\r
+No attempt is made to optimize anything here, just drop in the\r
+new command.\r
+---\r
+In a few subjective tests, this seems quite a bit faster than\r
+the version based on notmuch-show\r
+\r
+emacs/notmuch-address.el | 4 ++--\r
+ 1 file changed, 2 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
+index 9f6711b..de0b991 100644\r
+--- a/emacs/notmuch-address.el\r
++++ b/emacs/notmuch-address.el\r
+@@ -188,8 +188,8 @@ called when harvesting finishes."\r
+        (query (if filter-query\r
+                   (format "(%s) and (%s)" from-me-query filter-query)\r
+                 from-me-query))\r
+-       (args `("show" "--format=sexp" "--format-version=2"\r
+-               "--body=false" "--entire-thread=false" ,query)))\r
++       (args `("address" "--format=sexp" "--format-version=2"\r
++               ,query)))\r
+     (if synchronous\r
+       (notmuch-query-map-threads 'notmuch-address-harvest-msg\r
+                                  (apply 'notmuch-call-notmuch-sexp args))\r
+-- \r
+2.1.4\r
+\r