[PATCH v2 9/11] emacs: move search based tree functions to notmuch.el
authorMark Walters <markwalters1009@gmail.com>
Fri, 1 Nov 2013 09:23:43 +0000 (09:23 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:49 +0000 (09:57 -0800)
11/d06c7e8ecd3efe2aec77ccd01a8e49826abc22 [new file with mode: 0644]

diff --git a/11/d06c7e8ecd3efe2aec77ccd01a8e49826abc22 b/11/d06c7e8ecd3efe2aec77ccd01a8e49826abc22
new file mode 100644 (file)
index 0000000..60d8725
--- /dev/null
@@ -0,0 +1,128 @@
+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 185D4429E28\r
+       for <notmuch@notmuchmail.org>; Fri,  1 Nov 2013 02:24: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 sfXiQVCSAcIL for <notmuch@notmuchmail.org>;\r
+       Fri,  1 Nov 2013 02:24:10 -0700 (PDT)\r
+Received: from mail-we0-f170.google.com (mail-we0-f170.google.com\r
+       [74.125.82.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 49080431FC9\r
+       for <notmuch@notmuchmail.org>; Fri,  1 Nov 2013 02:24:06 -0700 (PDT)\r
+Received: by mail-we0-f170.google.com with SMTP id u57so3759279wes.15\r
+       for <notmuch@notmuchmail.org>; Fri, 01 Nov 2013 02:24: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=nJh0UWR79KCRZjHzzVskA/jaJ8jILtEnM6aPyyFvulE=;\r
+       b=obCIXlDqoO1LnGD8aFB6ctGwoTOiyHqUOKxOZNlrZMKWF/+alqRGstK8gTjYzxI8mn\r
+       IVGV0CIRR46RpfzU9CCYtrAyoCxSgAvUReIAI3jq/DgXL+PRCby7/o06VpRhONcReEKi\r
+       DIGWD4XakXI9/M3FXjZLdqeIGWMZArIO1iyXWvjPd1WsR6c6swfkfvw8ppu3cqMSnUcH\r
+       JeFKRcsRb+se8VxS8ELNrOt5Go6NXHd1P/ZsOFlm5xhX3kQB3Wns7efl6sCTLhWq3vLM\r
+       p1OW6ja1HDWMF9TfcTPyMRXNNwb8hZzEjux6Y2FXFWKsLVNOhjfEalh7Z5SDjD1GZBGG\r
+       dasw==\r
+X-Received: by 10.180.95.202 with SMTP id dm10mr1510116wib.62.1383297845150;\r
+       Fri, 01 Nov 2013 02:24:05 -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 e1sm4529756wij.6.2013.11.01.02.24.04\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Fri, 01 Nov 2013 02:24:04 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 9/11] emacs: move search based tree functions to notmuch.el\r
+Date: Fri,  1 Nov 2013 09:23:43 +0000\r
+Message-Id: <1383297825-12326-4-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:15 -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