--- /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 38FC4421166\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:56:15 -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 kCr4gWh5rZ+V for <notmuch@notmuchmail.org>;\r
+ Tue, 29 Oct 2013 15:56:10 -0700 (PDT)\r
+Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com\r
+ [74.125.82.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 7A22F429E3D for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:55:58 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f46.google.com with SMTP id m15so544949wgh.1\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:55:57 -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=A+PwLnMtldeJhb/rZg9jAy8/hSc4JXoviPQRbydeufw=;\r
+ b=GrGCVpUfDfzEYbMV1Ieb8oQjHjc5Ecu7f0xcgNWgoFEuW9E1MtnXv4HJeYtgV/1yoF\r
+ 5GaUzhyTgc+1g1//VKTLmfocs93R3aoRuPfz77fhi8ND4xaFSzdRT17/DpHu0uSkLMvU\r
+ jPI0hmw1mquyurc9xPxLkN6LljZpRL/KptgRJNJZdSAFLcrT/su/+fsESUkX6NZ1lCkY\r
+ hwl9Vzl8RMuadnSohE18aG3jdBDa/AbRaTFp4syJ1JL2FjXcViFrZLmOlYjS8KRTBOZN\r
+ JPIYlkv1NrajuG+ycZiC/Q9uhZbOpmesQRk3n89AyzrMszTe+T0AWSwEMVJ6nfWbHZon\r
+ uXJQ==\r
+X-Received: by 10.194.104.66 with SMTP id gc2mr1516875wjb.75.1383087355795;\r
+ Tue, 29 Oct 2013 15:55:55 -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 y20sm9518514wib.0.2013.10.29.15.55.55\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Tue, 29 Oct 2013 15:55:55 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 07/11] emacs: minimal change to autoload notmuch-tree\r
+Date: Tue, 29 Oct 2013 22:55:34 +0000\r
+Message-Id: <1383087338-10220-8-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:15 -0000\r
+\r
+We want to autoload notmuch-tree.el so include it as a require in\r
+notmuch.el. To avoid circular dependency we need to move one\r
+keybinding from notmuch-tree.el to notmuch.el: it makes sense for it\r
+to be defined there anyway.\r
+\r
+Since tree is now autoloaded there is no need to print a message when\r
+it is loaded.\r
+---\r
+ emacs/notmuch-tree.el | 3 ---\r
+ emacs/notmuch.el | 2 ++\r
+ 2 files changed, 2 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
+index d3330a0..ebfb5e7 100644\r
+--- a/emacs/notmuch-tree.el\r
++++ b/emacs/notmuch-tree.el\r
+@@ -29,7 +29,6 @@\r
+ (require 'notmuch-show)\r
+ (require 'notmuch-tag)\r
+ (require 'notmuch-parser)\r
+-(require 'notmuch) ;; XXX ATM, as notmuch-search-mode-map is defined here\r
+ \r
+ (eval-when-compile (require 'cl))\r
+ (declare-function notmuch-search "notmuch" (&optional query oldest-first target-thread target-line))\r
+@@ -939,8 +938,6 @@ The arguments are:\r
+ \r
+ ;; Set up key bindings from the rest of notmuch.\r
+ (define-key notmuch-common-keymap "z" 'notmuch-tree)\r
+-(define-key notmuch-search-mode-map "Z" 'notmuch-tree-from-search-current-query)\r
+ (define-key notmuch-show-mode-map "Z" 'notmuch-tree-from-show-current-query)\r
+-(message "Initialised notmuch-tree")\r
+ \r
+ (provide 'notmuch-tree)\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 19210cb..418c781 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -54,6 +54,7 @@\r
+ (require 'notmuch-lib)\r
+ (require 'notmuch-tag)\r
+ (require 'notmuch-show)\r
++(require 'notmuch-tree)\r
+ (require 'notmuch-mua)\r
+ (require 'notmuch-hello)\r
+ (require 'notmuch-maildir-fcc)\r
+@@ -156,6 +157,7 @@ To enter a line break in customize, press \\[quoted-insert] C-j."\r
+ (define-key map "-" 'notmuch-search-remove-tag)\r
+ (define-key map "+" 'notmuch-search-add-tag)\r
+ (define-key map (kbd "RET") 'notmuch-search-show-thread)\r
++ (define-key map "Z" 'notmuch-tree-from-search-current-query)\r
+ map)\r
+ "Keymap for \"notmuch search\" buffers.")\r
+ (fset 'notmuch-search-mode-map notmuch-search-mode-map)\r
+-- \r
+1.7.9.1\r
+\r