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 2492F431FBC
\r
6 for <notmuch@notmuchmail.org>; Sat, 21 Apr 2012 02:15:52 -0700 (PDT)
\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 wiDy3sHd3UIP for <notmuch@notmuchmail.org>;
\r
18 Sat, 21 Apr 2012 02:15:51 -0700 (PDT)
\r
19 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com
\r
20 [209.85.212.169]) (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 798A7431FB6
\r
23 for <notmuch@notmuchmail.org>; Sat, 21 Apr 2012 02:15:51 -0700 (PDT)
\r
24 Received: by mail-wi0-f169.google.com with SMTP id hm17so1500624wib.2
\r
25 for <notmuch@notmuchmail.org>; Sat, 21 Apr 2012 02:15:51 -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:x-mailer:in-reply-to:references;
\r
28 bh=aasTrjmSImxmkYhyseG2hyVpp6vgyQIgMHe9SSkVsvI=;
\r
29 b=GjH0S6EySk8kvSohvPjU/zAcHBf4GZNIQ2N1h8uvZVBMINnVd186FFtuxydnaiSxdo
\r
30 eCXyQum3BqvT0vqwDlzXhqbwUDBf0+9RPYzYQGk7Idakkx0tXwOarvuxEN37zms128oF
\r
31 nFq1JfsAX2bsJVew042sqYRjtgBuvaCFjwNEwV5SIm/flJtEGxI0Nf2bHPVrgeGCq9o6
\r
32 kjQTwgUfk3InIeWUgxsJEJbLzXKQzt7wrUbROn68vaM/AVAj/L9nWRDiXx0TPak/kTQ1
\r
33 doxQ1HB3x/t3v73kjHHHiNZ1mOYkDf1h3VjSyukVp/7+NdR3qgkI73FxHBK6AmxGtlXD
\r
35 Received: by 10.180.94.33 with SMTP id cz1mr4754259wib.13.1334999751098;
\r
36 Sat, 21 Apr 2012 02:15:51 -0700 (PDT)
\r
37 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.
\r
38 [94.192.233.223]) by mx.google.com with ESMTPS id
\r
39 n8sm6654382wix.10.2012.04.21.02.15.50 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Sat, 21 Apr 2012 02:15:50 -0700 (PDT)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH v3 2/2] emacs: make elide messages use notmuch-show for
\r
45 Date: Sat, 21 Apr 2012 10:15:50 +0100
\r
46 Message-Id: <1334999750-21811-3-git-send-email-markwalters1009@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.9.1
\r
48 In-Reply-To: <1334999750-21811-1-git-send-email-markwalters1009@gmail.com>
\r
49 References: <1334999750-21811-1-git-send-email-markwalters1009@gmail.com>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Sat, 21 Apr 2012 09:15:52 -0000
\r
64 Previously the elide messages code got the entire-thread from
\r
65 notmuch-show.c and then threw away all non-matching messages. This
\r
66 version calls notmuch-show.c without the --entire-thread flag so
\r
67 it never receives the non-matching messages in the first place.
\r
69 This makes it substantially faster.
\r
71 emacs/notmuch-show.el | 18 ++++++++++--------
\r
72 1 files changed, 10 insertions(+), 8 deletions(-)
\r
74 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
75 index 4ee4290..347f90c 100644
\r
76 --- a/emacs/notmuch-show.el
\r
77 +++ b/emacs/notmuch-show.el
\r
78 @@ -976,9 +976,9 @@ current buffer, if possible."
\r
79 "Insert the message tree TREE at depth DEPTH in the current thread."
\r
80 (let ((msg (car tree))
\r
81 (replies (cadr tree)))
\r
82 - (if (or (not notmuch-show-elide-non-matching-messages)
\r
83 - (plist-get msg :match))
\r
84 - (notmuch-show-insert-msg msg depth))
\r
85 + ;; We test whether there is a message or just some replies.
\r
87 + (notmuch-show-insert-msg msg depth))
\r
88 (notmuch-show-insert-thread replies (1+ depth))))
\r
90 (defun notmuch-show-insert-thread (thread depth)
\r
91 @@ -1059,16 +1059,18 @@ function is used."
\r
92 (args (if notmuch-show-query-context
\r
93 (append (list "\'") basic-args
\r
94 (list "and (" notmuch-show-query-context ")\'"))
\r
95 - (append (list "\'") basic-args (list "\'")))))
\r
96 - (notmuch-show-insert-forest (notmuch-query-get-threads
\r
97 - (cons "--exclude=false" args)))
\r
98 + (append (list "\'") basic-args (list "\'"))))
\r
99 + (cli-args (cons "--exclude=false"
\r
100 + (when notmuch-show-elide-non-matching-messages
\r
101 + (list "--entire-thread=false")))))
\r
103 + (notmuch-show-insert-forest (notmuch-query-get-threads (append cli-args args)))
\r
104 ;; If the query context reduced the results to nothing, run
\r
105 ;; the basic query.
\r
106 (when (and (eq (buffer-size) 0)
\r
107 notmuch-show-query-context)
\r
108 (notmuch-show-insert-forest
\r
109 - (notmuch-query-get-threads
\r
110 - (cons "--exclude=false" basic-args)))))
\r
111 + (notmuch-query-get-threads (append cli-args basic-args)))))
\r
113 (jit-lock-register #'notmuch-show-buttonise-links)
\r