Re: Hi all
[notmuch-archives.git] / 6c / 59b76b63d96d04d0fb2b928cd6bf237c6b1d7b
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 25305429E5B\r
6         for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:20:09 -0800 (PST)\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 fcINuPGSKcCL for <notmuch@notmuchmail.org>;\r
18         Sun, 12 Feb 2012 17:20:07 -0800 (PST)\r
19 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
20  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  29F0441ED89    for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:35 -0800\r
23  (PST)\r
24 Received: by mail-ww0-f45.google.com with SMTP id dt12so3923384wgb.2\r
25         for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:34 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=bjPvB1mhZKhFbTwOQDABnBOGq9qBOylm7VNn7PMFCGQ=;\r
29         b=iA/9Fp/EbBVBDfMcHeME2lS9ULMDCaLnlLspBkqelUraq9mofsNTl5LvDziOCsjyrL\r
30         TkSPGnFQ7KeqznR8nvEU5/lG/CzIklrwADukjl8SZFu/7fQfsNPW6P0JAFr0e/OGoce6\r
31         QrbPxWa5SyXxZQQ4uylzUAJu0R8GdrxKH8/eA=\r
32 Received: by 10.180.7.231 with SMTP id m7mr19367336wia.3.1329095974926;\r
33         Sun, 12 Feb 2012 17:19:34 -0800 (PST)\r
34 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
35  [94.192.233.223])      by mx.google.com with ESMTPS id\r
36  m16sm2450022wie.9.2012.02.12.17.19.33  (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Sun, 12 Feb 2012 17:19:34 -0800 (PST)\r
38 From: Mark Walters <markwalters1009@gmail.com>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [RFC PATCH v3 10/11] emacs: notmuch-show.el just show the actual\r
41         matching messages\r
42 Date: Mon, 13 Feb 2012 01:20:14 +0000\r
43 Message-Id: <1329096015-8078-11-git-send-email-markwalters1009@gmail.com>\r
44 X-Mailer: git-send-email 1.7.2.3\r
45 In-Reply-To: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com>\r
46 References: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com>\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Mon, 13 Feb 2012 01:20:09 -0000\r
60 \r
61 Allow a parameter to notmuch-show to just show the matching\r
62 messages. This is very similar to\r
63 notmuch-show-elide-non-matching-messages but since it calls\r
64 notmuch-show.c with the --thread=none parameter it does not keep any\r
65 threading information.\r
66 \r
67 In particular the sort order is different: the elide-non-matching\r
68 sorts by thread and just omits the non-matching messages, this option\r
69 sorts by message.\r
70 \r
71 It is likely that the two should be unified.\r
72 ---\r
73  emacs/notmuch-show.el |   14 ++++++++++++--\r
74  1 files changed, 12 insertions(+), 2 deletions(-)\r
75 \r
76 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
77 index 8a8acf6..1adf964 100644\r
78 --- a/emacs/notmuch-show.el\r
79 +++ b/emacs/notmuch-show.el\r
80 @@ -152,6 +152,12 @@ indentation."\r
81  (make-variable-buffer-local 'notmuch-show-elide-non-matching-messages)\r
82  (put 'notmuch-show-elide-non-matching-messages 'permanent-local t)\r
83  \r
84 +;; This is very similar to the previous variable: they should be\r
85 +;; unified. MJW\r
86 +(defvar notmuch-show-just-matches nil)\r
87 +(make-variable-buffer-local 'notmuch-show-just-matches)\r
88 +(put 'notmuch-show-just-matches 'permanent-local t)\r
89 +\r
90  (defvar notmuch-show-indent-content t)\r
91  (make-variable-buffer-local 'notmuch-show-indent-content)\r
92  (put 'notmuch-show-indent-content 'permanent-local t)\r
93 @@ -1014,7 +1020,7 @@ a corresponding notmuch search."\r
94                         'face goto-address-mail-face))))\r
95  \r
96  ;;;###autoload\r
97 -(defun notmuch-show (thread-id &optional parent-buffer query-context buffer-name)\r
98 +(defun notmuch-show (thread-id &optional parent-buffer query-context buffer-name just-matches)\r
99    "Run \"notmuch show\" with the given thread ID and display results.\r
100  \r
101  The optional PARENT-BUFFER is the notmuch-search buffer from\r
102 @@ -1047,7 +1053,9 @@ function is used."\r
103  \r
104      (setq notmuch-show-thread-id thread-id\r
105           notmuch-show-parent-buffer parent-buffer\r
106 -         notmuch-show-query-context query-context)\r
107 +         notmuch-show-query-context query-context\r
108 +         notmuch-show-just-matches just-matches)\r
109 +\r
110      (notmuch-show-worker)\r
111      (current-buffer)))\r
112  \r
113 @@ -1066,6 +1074,8 @@ function is used."\r
114                        (append (list "\'") basic-args\r
115                                (list "and (" notmuch-show-query-context ")\'"))\r
116                      (append (list "\'") basic-args (list "\'")))))\r
117 +       (if notmuch-show-just-matches\r
118 +           (setq args (append (list "--thread=none") args)))\r
119         (notmuch-show-insert-forest (notmuch-query-get-threads args))\r
120         ;; If the query context reduced the results to nothing, run\r
121         ;; the basic query.\r
122 -- \r
123 1.7.2.3\r
124 \r