--- /dev/null
+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 arlo.cworth.org (Postfix) with ESMTP id 5C8E36DE1BC4\r
+ for <notmuch@notmuchmail.org>; Sun, 5 Apr 2015 16:03:22 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.511\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.511 tagged_above=-999 required=5 tests=[AWL=0.501, \r
+ T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id Pk5QjLLDVjae for <notmuch@notmuchmail.org>;\r
+ Sun, 5 Apr 2015 16:03:20 -0700 (PDT)\r
+Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
+ [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id C531E6DE1BB0\r
+ for <notmuch@notmuchmail.org>; Sun, 5 Apr 2015 16:03:18 -0700 (PDT)\r
+Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
+ 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1YetYr-0002pw-AP; Sun, 05 Apr 2015 23:02:37 +0000\r
+Received: (nullmailer pid 2257 invoked by uid 1000); Sun, 05 Apr 2015\r
+ 22:59:25 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [WIP2 11/12] emacs: convert notmuch-tree to format-version 3\r
+Date: Mon, 6 Apr 2015 07:59:13 +0900\r
+Message-Id: <1428274754-1698-12-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1428274754-1698-1-git-send-email-david@tethera.net>\r
+References: <1428274754-1698-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Sun, 05 Apr 2015 23:03:22 -0000\r
+\r
+This is similarly trivial conversion to that applied to\r
+notmuch-search, and is subject to the same objections\r
+---\r
+ emacs/notmuch-tree.el | 11 ++++++-----\r
+ 1 file changed, 6 insertions(+), 5 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
+index ca5f9b6..bae3de0 100644\r
+--- a/emacs/notmuch-tree.el\r
++++ b/emacs/notmuch-tree.el\r
+@@ -774,10 +774,11 @@ message together with all its descendents."\r
+ \r
+ (defun notmuch-tree-insert-forest-thread (forest-thread)\r
+ "Insert a single complete thread."\r
+- (let (tree-status)\r
+- ;; Reset at the start of each main thread.\r
+- (setq notmuch-tree-previous-subject nil)\r
+- (notmuch-tree-insert-thread forest-thread 0 tree-status)))\r
++ (unless (notmuch-query-metadata-p forest-thread)\r
++ (let (tree-status)\r
++ ;; Reset at the start of each main thread.\r
++ (setq notmuch-tree-previous-subject nil)\r
++ (notmuch-tree-insert-thread forest-thread 0 tree-status))))\r
+ \r
+ (defun notmuch-tree-insert-forest (forest)\r
+ "Insert a forest of threads.\r
+@@ -871,7 +872,7 @@ the same as for the function notmuch-tree."\r
+ (notmuch-tag-clear-cache)\r
+ (let ((proc (notmuch-start-notmuch\r
+ "notmuch-tree" (current-buffer) #'notmuch-tree-process-sentinel\r
+- "show" "--body=false" "--format=sexp" "--format-version=2"\r
++ "show" "--body=false" "--format=sexp" "--format-version=3"\r
+ message-arg search-args))\r
+ ;; Use a scratch buffer to accumulate partial output.\r
+ ;; This buffer will be killed by the sentinel, which\r
+-- \r
+2.1.4\r
+\r