Re: Flat search and threaded views
[notmuch-archives.git] / 11 / d06c7e8ecd3efe2aec77ccd01a8e49826abc22
1 Return-Path: <markwalters1009@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 185D4429E28\r
6         for <notmuch@notmuchmail.org>; Fri,  1 Nov 2013 02:24:15 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id sfXiQVCSAcIL for <notmuch@notmuchmail.org>;\r
18         Fri,  1 Nov 2013 02:24:10 -0700 (PDT)\r
19 Received: from mail-we0-f170.google.com (mail-we0-f170.google.com\r
20         [74.125.82.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 49080431FC9\r
23         for <notmuch@notmuchmail.org>; Fri,  1 Nov 2013 02:24:06 -0700 (PDT)\r
24 Received: by mail-we0-f170.google.com with SMTP id u57so3759279wes.15\r
25         for <notmuch@notmuchmail.org>; Fri, 01 Nov 2013 02:24:05 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
28         bh=nJh0UWR79KCRZjHzzVskA/jaJ8jILtEnM6aPyyFvulE=;\r
29         b=obCIXlDqoO1LnGD8aFB6ctGwoTOiyHqUOKxOZNlrZMKWF/+alqRGstK8gTjYzxI8mn\r
30         IVGV0CIRR46RpfzU9CCYtrAyoCxSgAvUReIAI3jq/DgXL+PRCby7/o06VpRhONcReEKi\r
31         DIGWD4XakXI9/M3FXjZLdqeIGWMZArIO1iyXWvjPd1WsR6c6swfkfvw8ppu3cqMSnUcH\r
32         JeFKRcsRb+se8VxS8ELNrOt5Go6NXHd1P/ZsOFlm5xhX3kQB3Wns7efl6sCTLhWq3vLM\r
33         p1OW6ja1HDWMF9TfcTPyMRXNNwb8hZzEjux6Y2FXFWKsLVNOhjfEalh7Z5SDjD1GZBGG\r
34         dasw==\r
35 X-Received: by 10.180.95.202 with SMTP id dm10mr1510116wib.62.1383297845150;\r
36         Fri, 01 Nov 2013 02:24:05 -0700 (PDT)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id e1sm4529756wij.6.2013.11.01.02.24.04\r
39         for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Fri, 01 Nov 2013 02:24:04 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH v2 9/11] emacs: move search based tree functions to notmuch.el\r
45 Date: Fri,  1 Nov 2013 09:23:43 +0000\r
46 Message-Id: <1383297825-12326-4-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1383297825-12326-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com>\r
50         <1383297825-12326-1-git-send-email-markwalters1009@gmail.com>\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Fri, 01 Nov 2013 09:24:15 -0000\r
64 \r
65 Move a couple of the search mode specifc caller helpers for tree from\r
66 tree into notmuch.el.\r
67 ---\r
68  emacs/notmuch-tree.el |   18 ------------------\r
69  emacs/notmuch.el      |   14 ++++++++++++++\r
70  2 files changed, 14 insertions(+), 18 deletions(-)\r
71 \r
72 diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
73 index ebfb5e7..78b4a57 100644\r
74 --- a/emacs/notmuch-tree.el\r
75 +++ b/emacs/notmuch-tree.el\r
76 @@ -413,24 +413,6 @@ Does NOT change the database."\r
77                 notmuch-show-query-context\r
78                 (notmuch-show-get-message-id)))\r
79  \r
80 -;; This function should be in notmuch.el but be we trying to minimise\r
81 -;; impact on the rest of the codebase.\r
82 -(defun notmuch-tree-from-search-current-query ()\r
83 -  "Call notmuch tree with the current query"\r
84 -  (interactive)\r
85 -  (notmuch-tree notmuch-search-query-string))\r
86 -\r
87 -;; This function should be in notmuch.el but be we trying to minimise\r
88 -;; impact on the rest of the codebase.\r
89 -(defun notmuch-tree-from-search-thread ()\r
90 -  "Show the selected thread with notmuch-tree"\r
91 -  (interactive)\r
92 -  (notmuch-tree (notmuch-search-find-thread-id)\r
93 -                notmuch-search-query-string\r
94 -               nil\r
95 -                (notmuch-prettify-subject (notmuch-search-find-subject))\r
96 -               t))\r
97 -\r
98  (defun notmuch-tree-message-window-kill-hook ()\r
99    "Close the message pane when exiting the show buffer."\r
100    (let ((buffer (current-buffer)))\r
101 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
102 index 418c781..2c9a07c 100644\r
103 --- a/emacs/notmuch.el\r
104 +++ b/emacs/notmuch.el\r
105 @@ -439,6 +439,20 @@ If BARE is set then do not prefix with \"thread:\""\r
106                       (concat "*" (truncate-string-to-width subject 30 nil nil t) "*"))\r
107        (message "End of search results."))))\r
108  \r
109 +(defun notmuch-tree-from-search-current-query ()\r
110 +  "Call notmuch tree with the current query"\r
111 +  (interactive)\r
112 +  (notmuch-tree notmuch-search-query-string))\r
113 +\r
114 +(defun notmuch-tree-from-search-thread ()\r
115 +  "Show the selected thread with notmuch-tree"\r
116 +  (interactive)\r
117 +  (notmuch-tree (notmuch-search-find-thread-id)\r
118 +                notmuch-search-query-string\r
119 +               nil\r
120 +                (notmuch-prettify-subject (notmuch-search-find-subject))\r
121 +               t))\r
122 +\r
123  (defun notmuch-search-reply-to-thread (&optional prompt-for-sender)\r
124    "Begin composing a reply-all to the entire current thread in a new buffer."\r
125    (interactive "P")\r
126 -- \r
127 1.7.9.1\r
128 \r