[PATCH v2 11/11] emacs: move the show entry to tree into show.el
authorMark Walters <markwalters1009@gmail.com>
Fri, 1 Nov 2013 09:23:45 +0000 (09:23 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:49 +0000 (09:57 -0800)
c4/23fccaf43ad2cdee02a466fff7308377bdeea4 [new file with mode: 0644]

diff --git a/c4/23fccaf43ad2cdee02a466fff7308377bdeea4 b/c4/23fccaf43ad2cdee02a466fff7308377bdeea4
new file mode 100644 (file)
index 0000000..2ccb70c
--- /dev/null
@@ -0,0 +1,137 @@
+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 B4382429E3D\r
+       for <notmuch@notmuchmail.org>; Fri,  1 Nov 2013 02:24:23 -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 tTDDwnsgYAaM for <notmuch@notmuchmail.org>;\r
+       Fri,  1 Nov 2013 02:24:19 -0700 (PDT)\r
+Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com\r
+       [209.85.212.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id D8298431FD0\r
+       for <notmuch@notmuchmail.org>; Fri,  1 Nov 2013 02:24:14 -0700 (PDT)\r
+Received: by mail-wi0-f180.google.com with SMTP id ey11so801279wid.7\r
+       for <notmuch@notmuchmail.org>; Fri, 01 Nov 2013 02:24:13 -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=2Tcv2CSocTH6Y2WyrQa6xFZ0FeVkRZGnxf92aUL1Vec=;\r
+       b=l+UsVRGoICXwKEkVDwNo6N+iyzJigoqPaDxDeQ5ljBXVc5uUTi3mtlFesVkcwqsEn2\r
+       YtXxkU60TzQSSeyUeO/M1TnV2QAKCSM7+pX+vHnpzo9YR1C1NLQe5Gwuhpa+BY6bABzJ\r
+       0KTdajMfyFfTQoN5oo3AouQxH+/UrqDPjAvPPSpkAsMXg92FWEOgMu75q0sS+KBm98Eo\r
+       HQWJNUGIF0Z4yfbXqiUQkZOkB11MP1oC0yOlB+5zrvO4Dom4QqsN8EWNB+0tKDJmj98b\r
+       jP21oWsd1jk/DMS707VFvGblO6/5L7avVy7MR9wuBLf/4eAaxw6PjzRL/0w8EzGh+nAd\r
+       1Dsw==\r
+X-Received: by 10.180.76.114 with SMTP id j18mr1651740wiw.35.1383297853833;\r
+       Fri, 01 Nov 2013 02:24:13 -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 fr4sm4524846wib.0.2013.11.01.02.24.13\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Fri, 01 Nov 2013 02:24:13 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 11/11] emacs: move the show entry to tree into show.el\r
+Date: Fri,  1 Nov 2013 09:23:45 +0000\r
+Message-Id: <1383297825-12326-6-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:24:24 -0000\r
+\r
+Move the keybinding and show specific helper from tree.el to show.el\r
+---\r
+ emacs/notmuch-show.el |   10 ++++++++++\r
+ emacs/notmuch-tree.el |   12 +-----------\r
+ 2 files changed, 11 insertions(+), 11 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 9e8b9c0..f00273a 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -44,6 +44,8 @@\r
+ (declare-function notmuch-foreach-mime-part "notmuch" (function mm-handle))\r
+ (declare-function notmuch-count-attachments "notmuch" (mm-handle))\r
+ (declare-function notmuch-save-attachments "notmuch" (mm-handle &optional queryp))\r
++(declare-function notmuch-tree "notmuch-tree"\r
++                (&optional query query-context target buffer-name open-target))\r
\r
+ (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")\r
+   "Headers that should be shown in a message, in this order.\r
+@@ -1247,6 +1249,7 @@ reset based on the original query."\r
+ (defvar notmuch-show-mode-map\r
+       (let ((map (make-sparse-keymap)))\r
+       (set-keymap-parent map notmuch-common-keymap)\r
++      (define-key map "Z" 'notmuch-tree-from-show-current-query)\r
+       (define-key map (kbd "<C-tab>") 'widget-backward)\r
+       (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)\r
+       (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)\r
+@@ -1323,6 +1326,13 @@ All currently available key bindings:\r
+   (setq buffer-read-only t\r
+       truncate-lines t))\r
\r
++(defun notmuch-tree-from-show-current-query ()\r
++  "Call notmuch tree with the current query"\r
++  (interactive)\r
++  (notmuch-tree notmuch-show-thread-id\r
++              notmuch-show-query-context\r
++              (notmuch-show-get-message-id)))\r
++\r
+ (defun notmuch-show-move-to-message-top ()\r
+   (goto-char (notmuch-show-message-top)))\r
\r
+diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
+index c66dd35..f13b41f 100644\r
+--- a/emacs/notmuch-tree.el\r
++++ b/emacs/notmuch-tree.el\r
+@@ -404,15 +404,6 @@ Does NOT change the database."\r
+     (notmuch-tree-close-message-window)\r
+     (notmuch-tree query)))\r
\r
+-;; This function should be in notmuch-show.el but be we trying to\r
+-;; minimise impact on the rest of the codebase.\r
+-(defun notmuch-tree-from-show-current-query ()\r
+-  "Call notmuch tree with the current query"\r
+-  (interactive)\r
+-  (notmuch-tree notmuch-show-thread-id\r
+-              notmuch-show-query-context\r
+-              (notmuch-show-get-message-id)))\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
+@@ -918,7 +909,6 @@ The arguments are:\r
+   (setq truncate-lines t))\r
\r
\r
+-;; Set up key bindings from the rest of notmuch.\r
+-(define-key notmuch-show-mode-map "Z" 'notmuch-tree-from-show-current-query)\r
++;;\r
\r
+ (provide 'notmuch-tree)\r
+-- \r
+1.7.9.1\r
+\r