--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\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 BF11C431FD7\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:56:19 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ RCVD_IN_DNSWL_LOW=-0.7] 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 Zinw1BIAKuGY for <notmuch@notmuchmail.org>;\r
+ Tue, 29 Oct 2013 15:56:15 -0700 (PDT)\r
+Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com\r
+ [74.125.82.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ D0BC5431FC4 for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:55:59 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f42.google.com with SMTP id n12so5390697wgh.1\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:55:58 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+ bh=nJh0UWR79KCRZjHzzVskA/jaJ8jILtEnM6aPyyFvulE=;\r
+ b=B+eVkQcrRv/FSdWTR0Ck3azHFJ+SlevOjP/Loqcb+W1Zrifax5AwN/UeBIlluEy3hx\r
+ bGXwrsta7C7gAbZp0NznGXeUYeFX2y/m1RinHXvNiYPKmFPWcrFZpzPTOF9kn66GGV3A\r
+ qagrMqQzyxmNqmgP+DuhBbGm7ueyI8kVMWHPueNjk1KnHEOYasY/at9UozLYkbNttQln\r
+ L1Y5r/AvUlONQSv9Tu7IxS5coOU20BZ1U3V6JyU+8c1bLOULPAYSrKQPHPzi2YyKqZ8z\r
+ c9+cUKrYSMp8UmM3eYmuHGlQZ9SwRlZMKF4cNW8mqVQ/FR2fPWZUy1rUVBk4elaBT4d1\r
+ zfVQ==\r
+X-Received: by 10.194.187.101 with SMTP id fr5mr481563wjc.76.1383087358738;\r
+ Tue, 29 Oct 2013 15:55:58 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+ by mx.google.com with ESMTPSA id b7sm9539338wiz.8.2013.10.29.15.55.58\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Tue, 29 Oct 2013 15:55:58 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 09/11] emacs: move search based tree functions to notmuch.el\r
+Date: Tue, 29 Oct 2013 22:55:36 +0000\r
+Message-Id: <1383087338-10220-10-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com>\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: Tue, 29 Oct 2013 22:56:20 -0000\r
+\r
+Move a couple of the search mode specifc caller helpers for tree from\r
+tree into notmuch.el.\r
+---\r
+ emacs/notmuch-tree.el | 18 ------------------\r
+ emacs/notmuch.el | 14 ++++++++++++++\r
+ 2 files changed, 14 insertions(+), 18 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
+index ebfb5e7..78b4a57 100644\r
+--- a/emacs/notmuch-tree.el\r
++++ b/emacs/notmuch-tree.el\r
+@@ -413,24 +413,6 @@ Does NOT change the database."\r
+ notmuch-show-query-context\r
+ (notmuch-show-get-message-id)))\r
+ \r
+-;; This function should be in notmuch.el but be we trying to minimise\r
+-;; impact on the rest of the codebase.\r
+-(defun notmuch-tree-from-search-current-query ()\r
+- "Call notmuch tree with the current query"\r
+- (interactive)\r
+- (notmuch-tree notmuch-search-query-string))\r
+-\r
+-;; This function should be in notmuch.el but be we trying to minimise\r
+-;; impact on the rest of the codebase.\r
+-(defun notmuch-tree-from-search-thread ()\r
+- "Show the selected thread with notmuch-tree"\r
+- (interactive)\r
+- (notmuch-tree (notmuch-search-find-thread-id)\r
+- notmuch-search-query-string\r
+- nil\r
+- (notmuch-prettify-subject (notmuch-search-find-subject))\r
+- t))\r
+-\r
+ (defun notmuch-tree-message-window-kill-hook ()\r
+ "Close the message pane when exiting the show buffer."\r
+ (let ((buffer (current-buffer)))\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 418c781..2c9a07c 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -439,6 +439,20 @@ If BARE is set then do not prefix with \"thread:\""\r
+ (concat "*" (truncate-string-to-width subject 30 nil nil t) "*"))\r
+ (message "End of search results."))))\r
+ \r
++(defun notmuch-tree-from-search-current-query ()\r
++ "Call notmuch tree with the current query"\r
++ (interactive)\r
++ (notmuch-tree notmuch-search-query-string))\r
++\r
++(defun notmuch-tree-from-search-thread ()\r
++ "Show the selected thread with notmuch-tree"\r
++ (interactive)\r
++ (notmuch-tree (notmuch-search-find-thread-id)\r
++ notmuch-search-query-string\r
++ nil\r
++ (notmuch-prettify-subject (notmuch-search-find-subject))\r
++ t))\r
++\r
+ (defun notmuch-search-reply-to-thread (&optional prompt-for-sender)\r
+ "Begin composing a reply-all to the entire current thread in a new buffer."\r
+ (interactive "P")\r
+-- \r
+1.7.9.1\r
+\r