From c6847b8f4bb687ba83a9450eac331f01544e525a Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 1 Nov 2013 09:23:41 +0000 Subject: [PATCH] [PATCH v2 7/11] emacs: minimal change to load notmuch-tree by default --- 8f/61c8fb57f6cda50ebc0e549d57577805d9ce24 | 120 ++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 8f/61c8fb57f6cda50ebc0e549d57577805d9ce24 diff --git a/8f/61c8fb57f6cda50ebc0e549d57577805d9ce24 b/8f/61c8fb57f6cda50ebc0e549d57577805d9ce24 new file mode 100644 index 000000000..06953e969 --- /dev/null +++ b/8f/61c8fb57f6cda50ebc0e549d57577805d9ce24 @@ -0,0 +1,120 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 546C3431FC2 + for ; Fri, 1 Nov 2013 02:29:13 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id rUIA3snMpGQZ for ; + Fri, 1 Nov 2013 02:29:06 -0700 (PDT) +Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com + [209.85.212.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 90EC0431FBD + for ; Fri, 1 Nov 2013 02:29:06 -0700 (PDT) +Received: by mail-wi0-f176.google.com with SMTP id ex4so809297wid.15 + for ; Fri, 01 Nov 2013 02:29:05 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=5U5K+MbMDh9Zt++PBAofGrzyVfISbKX1UqqHEQvxfGc=; + b=Uf0yXMX5kNbMSg4U+2xebqN5+pnd+Z1MvUd9c30baSc09CHs6S5q+LExZw53LYnt0d + AVXw2UOCzQsK4rxhhAG8+b02GQmQaYzrDUUQkMih+OdMlmKPt+/e4iLRBKSOszt3kwgz + 3v97taYOrjAcwVyOUZHo1VDC017qIyhGuNPyBFEzkOmc62subh2VU4DKIBW1u8utRap0 + Z4WWJH1+wRLZN9hyom4Vx6hvSQV8tIB6JlQg863eM3b9c4b4Br4WinatR8761scuAKxe + 0eZRudA0fVzDPBOpabIOb8BDcyzjnxwOJyWKSXCCLvKvnfAtLDq1kRntPez/vMUDpkxI + uF5g== +X-Received: by 10.180.73.239 with SMTP id o15mr1726541wiv.36.1383297838393; + Fri, 01 Nov 2013 02:23:58 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id fr4sm4520825wib.0.2013.11.01.02.23.57 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Fri, 01 Nov 2013 02:23:58 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v2 7/11] emacs: minimal change to load notmuch-tree by default +Date: Fri, 1 Nov 2013 09:23:41 +0000 +Message-Id: <1383297825-12326-2-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1383297825-12326-1-git-send-email-markwalters1009@gmail.com> +References: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com> + <1383297825-12326-1-git-send-email-markwalters1009@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 01 Nov 2013 09:29:13 -0000 + +We want to load notmuch-tree when notmuch is loaded, so include it as +a require in notmuch.el. To avoid circular dependency we need to move +one keybinding from notmuch-tree.el to notmuch.el: it makes sense for +it to be defined there anyway. + +Since tree is now loaded by default there is no need to print a +message when it is loaded. +--- + emacs/notmuch-tree.el | 3 --- + emacs/notmuch.el | 2 ++ + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el +index d3330a0..ebfb5e7 100644 +--- a/emacs/notmuch-tree.el ++++ b/emacs/notmuch-tree.el +@@ -29,7 +29,6 @@ + (require 'notmuch-show) + (require 'notmuch-tag) + (require 'notmuch-parser) +-(require 'notmuch) ;; XXX ATM, as notmuch-search-mode-map is defined here + + (eval-when-compile (require 'cl)) + (declare-function notmuch-search "notmuch" (&optional query oldest-first target-thread target-line)) +@@ -939,8 +938,6 @@ The arguments are: + + ;; Set up key bindings from the rest of notmuch. + (define-key notmuch-common-keymap "z" 'notmuch-tree) +-(define-key notmuch-search-mode-map "Z" 'notmuch-tree-from-search-current-query) + (define-key notmuch-show-mode-map "Z" 'notmuch-tree-from-show-current-query) +-(message "Initialised notmuch-tree") + + (provide 'notmuch-tree) +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index 19210cb..418c781 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -54,6 +54,7 @@ + (require 'notmuch-lib) + (require 'notmuch-tag) + (require 'notmuch-show) ++(require 'notmuch-tree) + (require 'notmuch-mua) + (require 'notmuch-hello) + (require 'notmuch-maildir-fcc) +@@ -156,6 +157,7 @@ To enter a line break in customize, press \\[quoted-insert] C-j." + (define-key map "-" 'notmuch-search-remove-tag) + (define-key map "+" 'notmuch-search-add-tag) + (define-key map (kbd "RET") 'notmuch-search-show-thread) ++ (define-key map "Z" 'notmuch-tree-from-search-current-query) + map) + "Keymap for \"notmuch search\" buffers.") + (fset 'notmuch-search-mode-map notmuch-search-mode-map) +-- +1.7.9.1 + -- 2.26.2