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 9026E431FD7
\r
6 for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:29 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 4wXRXeVZneTN for <notmuch@notmuchmail.org>;
\r
18 Thu, 23 Feb 2012 13:40:28 -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 8F815431FC3 for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:27 -0800
\r
24 Received: by wgbdt12 with SMTP id dt12so1340178wgb.2
\r
25 for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:26 -0800 (PST)
\r
26 Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates
\r
27 10.180.92.71 as permitted sender) client-ip=10.180.92.71;
\r
28 Authentication-Results: mr.google.com; spf=pass (google.com: domain of
\r
29 markwalters1009@gmail.com designates 10.180.92.71 as permitted
\r
30 sender) smtp.mail=markwalters1009@gmail.com;
\r
31 dkim=pass header.i=markwalters1009@gmail.com
\r
32 Received: from mr.google.com ([10.180.92.71])
\r
33 by 10.180.92.71 with SMTP id ck7mr430612wib.3.1330033226320 (num_hops =
\r
34 1); Thu, 23 Feb 2012 13:40:26 -0800 (PST)
\r
35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
36 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
37 bh=noVItqpIuPzOT7QTxwJZajjm7owBIqCzFrDF3S4ak8M=;
\r
38 b=U8po1F9BBug2fTmtoBMhZLmkRDprJ+SkBTriHAxraaQmZbMjDUbvS5wgCuOpBN7mvc
\r
39 2wThnSpr/8b6cIDwrHp/ZMvXWAI8DstR6hRgWe3fd4K9Y9jaKhvkS5LLZ/CSixxAGFcR
\r
40 BqjYrZFF+6+ju8VLVobuorQTEYKb1mzqPX6RM=
\r
41 Received: by 10.180.92.71 with SMTP id ck7mr349988wib.3.1330033226264;
\r
42 Thu, 23 Feb 2012 13:40:26 -0800 (PST)
\r
43 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.
\r
44 [94.192.233.223]) by mx.google.com with ESMTPS id
\r
45 ga1sm12335409wib.5.2012.02.23.13.40.24 (version=TLSv1/SSLv3 cipher=OTHER);
\r
46 Thu, 23 Feb 2012 13:40:25 -0800 (PST)
\r
47 From: Mark Walters <markwalters1009@gmail.com>
\r
48 To: notmuch@notmuchmail.org
\r
49 Subject: [PATCH 2/2] emacs: make elide messages use notmuch-show for omitting
\r
51 Date: Thu, 23 Feb 2012 21:41:34 +0000
\r
52 Message-Id: <1330033294-21980-3-git-send-email-markwalters1009@gmail.com>
\r
53 X-Mailer: git-send-email 1.7.2.3
\r
54 In-Reply-To: <1330033294-21980-1-git-send-email-markwalters1009@gmail.com>
\r
55 References: <1330033294-21980-1-git-send-email-markwalters1009@gmail.com>
\r
56 X-BeenThere: notmuch@notmuchmail.org
\r
57 X-Mailman-Version: 2.1.13
\r
59 List-Id: "Use and development of the notmuch mail system."
\r
60 <notmuch.notmuchmail.org>
\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
64 List-Post: <mailto:notmuch@notmuchmail.org>
\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
68 X-List-Received-Date: Thu, 23 Feb 2012 21:40:29 -0000
\r
70 Previously the elide messages code got the entire-thread from
\r
71 notmuch-show.c and then threw away all non-matching messages. This
\r
72 version calls notmuch-show.c without the --entire-thread flag so
\r
73 it never receives the non-matching messages in the first place.
\r
75 This makes it substantially faster.
\r
77 emacs/notmuch-show.el | 10 ++++++----
\r
78 1 files changed, 6 insertions(+), 4 deletions(-)
\r
80 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
81 index dcef3d5..e368363 100644
\r
82 --- a/emacs/notmuch-show.el
\r
83 +++ b/emacs/notmuch-show.el
\r
84 @@ -981,9 +981,10 @@ current buffer, if possible."
\r
85 "Insert the message tree TREE at depth DEPTH in the current thread."
\r
86 (let ((msg (car tree))
\r
87 (replies (cadr tree)))
\r
88 - (if (or (not notmuch-show-elide-non-matching-messages)
\r
89 - (plist-get msg :match))
\r
90 - (notmuch-show-insert-msg msg depth))
\r
91 + ;; We test whether there is a message or just some replies.
\r
92 + (if (eq (length tree) 2)
\r
93 + (notmuch-show-insert-msg msg depth)
\r
94 + (setq replies msg))
\r
95 (notmuch-show-insert-thread replies (1+ depth))))
\r
97 (defun notmuch-show-insert-thread (thread depth)
\r
98 @@ -1064,7 +1065,8 @@ function is used."
\r
99 (append (list "\'") basic-args
\r
100 (list "and (" notmuch-show-query-context ")\'"))
\r
101 (append (list "\'") basic-args (list "\'"))))
\r
102 - (cli-args (list "--entire-thread")))
\r
103 + (cli-args (unless notmuch-show-elide-non-matching-messages
\r
104 + (list "--entire-thread"))))
\r
105 (notmuch-show-insert-forest (notmuch-query-get-threads (append cli-args args)))
\r
106 ;; If the query context reduced the results to nothing, run
\r
107 ;; the basic query.
\r