[PATCH v2 7/11] emacs: minimal change to load notmuch-tree by default
authorMark Walters <markwalters1009@gmail.com>
Fri, 1 Nov 2013 09:23:41 +0000 (09:23 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:48 +0000 (09:57 -0800)
8f/61c8fb57f6cda50ebc0e549d57577805d9ce24 [new file with mode: 0644]

diff --git a/8f/61c8fb57f6cda50ebc0e549d57577805d9ce24 b/8f/61c8fb57f6cda50ebc0e549d57577805d9ce24
new file mode 100644 (file)
index 0000000..06953e9
--- /dev/null
@@ -0,0 +1,120 @@
+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 546C3431FC2\r
+       for <notmuch@notmuchmail.org>; Fri,  1 Nov 2013 02:29:13 -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 rUIA3snMpGQZ for <notmuch@notmuchmail.org>;\r
+       Fri,  1 Nov 2013 02:29:06 -0700 (PDT)\r
+Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com\r
+       [209.85.212.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 90EC0431FBD\r
+       for <notmuch@notmuchmail.org>; Fri,  1 Nov 2013 02:29:06 -0700 (PDT)\r
+Received: by mail-wi0-f176.google.com with SMTP id ex4so809297wid.15\r
+       for <notmuch@notmuchmail.org>; Fri, 01 Nov 2013 02:29:05 -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=5U5K+MbMDh9Zt++PBAofGrzyVfISbKX1UqqHEQvxfGc=;\r
+       b=Uf0yXMX5kNbMSg4U+2xebqN5+pnd+Z1MvUd9c30baSc09CHs6S5q+LExZw53LYnt0d\r
+       AVXw2UOCzQsK4rxhhAG8+b02GQmQaYzrDUUQkMih+OdMlmKPt+/e4iLRBKSOszt3kwgz\r
+       3v97taYOrjAcwVyOUZHo1VDC017qIyhGuNPyBFEzkOmc62subh2VU4DKIBW1u8utRap0\r
+       Z4WWJH1+wRLZN9hyom4Vx6hvSQV8tIB6JlQg863eM3b9c4b4Br4WinatR8761scuAKxe\r
+       0eZRudA0fVzDPBOpabIOb8BDcyzjnxwOJyWKSXCCLvKvnfAtLDq1kRntPez/vMUDpkxI\r
+       uF5g==\r
+X-Received: by 10.180.73.239 with SMTP id o15mr1726541wiv.36.1383297838393;\r
+       Fri, 01 Nov 2013 02:23: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 fr4sm4520825wib.0.2013.11.01.02.23.57\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Fri, 01 Nov 2013 02:23:58 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 7/11] emacs: minimal change to load notmuch-tree by default\r
+Date: Fri,  1 Nov 2013 09:23:41 +0000\r
+Message-Id: <1383297825-12326-2-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1383297825-12326-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com>\r
+       <1383297825-12326-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: Fri, 01 Nov 2013 09:29:13 -0000\r
+\r
+We want to load notmuch-tree when notmuch is loaded, so include it as\r
+a require in notmuch.el. To avoid circular dependency we need to move\r
+one keybinding from notmuch-tree.el to notmuch.el: it makes sense for\r
+it to be defined there anyway.\r
+\r
+Since tree is now loaded by default there is no need to print a\r
+message when 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