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 820DC431FB6
\r
6 for <notmuch@notmuchmail.org>; Tue, 10 Apr 2012 13:47:55 -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 g1MxwFQtkQ17 for <notmuch@notmuchmail.org>;
\r
18 Tue, 10 Apr 2012 13:47:55 -0700 (PDT)
\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com
\r
20 [74.125.82.181]) (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 BDE7F431FAE
\r
23 for <notmuch@notmuchmail.org>; Tue, 10 Apr 2012 13:47:54 -0700 (PDT)
\r
24 Received: by werm13 with SMTP id m13so151378wer.26
\r
25 for <notmuch@notmuchmail.org>; Tue, 10 Apr 2012 13:47:53 -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=fO/bx0mh1XPFW++kojX8QCp4rJh0d9Q9PO6UdkvZFMM=;
\r
29 b=qnOWmzzmGIVl1RX6gKS4B2qXohAPysL2xUehN25aTbs0qE0U3IQXFJMZah/A1BJCF/
\r
30 YKCI7GMYFi7t56gDES5rA63XNj8iaHmLh4Gd1cTZpDdc6+dQxmFUY3bB8yn/HqRB+My/
\r
31 LvuXzt9GXmNrmEpjRB8v8IIwhfDdgkNdxulcZNEqcXYcuy/b7fnYh10ZjDyqvWw7Wf6I
\r
32 1hEqIycn0bP0WgUiT9hBiezPUdypXmIhNjq52f0Pm+e8r7jBgqGTfl36tLgddFSAlw9x
\r
33 rwVj2G6j27JvQe8/1AvtYDdDScqOwo1TyQwjGH2v8+cWDyuouqVDB3C8ti1VX62Gg6D2
\r
35 Received: by 10.216.133.96 with SMTP id p74mr7178580wei.30.1334090873331;
\r
36 Tue, 10 Apr 2012 13:47:53 -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 fz9sm40090876wib.3.2012.04.10.13.47.50 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Tue, 10 Apr 2012 13:47:51 -0700 (PDT)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH] emacs: make elide messages use notmuch-show for omitting
\r
45 Date: Tue, 10 Apr 2012 21:48:04 +0100
\r
46 Message-Id: <1334090884-13001-1-git-send-email-markwalters1009@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.9.1
\r
48 In-Reply-To: <1334077496-9172-3-git-send-email-markwalters1009@gmail.com>
\r
49 References: <1334077496-9172-3-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: Tue, 10 Apr 2012 20:47:55 -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
72 This replaces the patch [1] as that mistakenly did not
\r
73 set --exclude=false in the case when messages are not elided.
\r
75 emacs/notmuch-show.el | 18 ++++++++++--------
\r
76 1 files changed, 10 insertions(+), 8 deletions(-)
\r
78 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
79 index 30b26d1..820bb41 100644
\r
80 --- a/emacs/notmuch-show.el
\r
81 +++ b/emacs/notmuch-show.el
\r
82 @@ -976,9 +976,9 @@ current buffer, if possible."
\r
83 "Insert the message tree TREE at depth DEPTH in the current thread."
\r
84 (let ((msg (car tree))
\r
85 (replies (cadr tree)))
\r
86 - (if (or (not notmuch-show-elide-non-matching-messages)
\r
87 - (plist-get msg :match))
\r
88 - (notmuch-show-insert-msg msg depth))
\r
89 + ;; We test whether there is a message or just some replies.
\r
91 + (notmuch-show-insert-msg msg depth))
\r
92 (notmuch-show-insert-thread replies (1+ depth))))
\r
94 (defun notmuch-show-insert-thread (thread depth)
\r
95 @@ -1059,16 +1059,18 @@ function is used."
\r
96 (args (if notmuch-show-query-context
\r
97 (append (list "\'") basic-args
\r
98 (list "and (" notmuch-show-query-context ")\'"))
\r
99 - (append (list "\'") basic-args (list "\'")))))
\r
100 - (notmuch-show-insert-forest (notmuch-query-get-threads
\r
101 - (cons "--exclude=false" args)))
\r
102 + (append (list "\'") basic-args (list "\'"))))
\r
103 + (cli-args (cons "--exclude=false"
\r
104 + (when notmuch-show-elide-non-matching-messages
\r
105 + (list "--entire-thread=false")))))
\r
107 + (notmuch-show-insert-forest (notmuch-query-get-threads (append cli-args args)))
\r
108 ;; If the query context reduced the results to nothing, run
\r
109 ;; the basic query.
\r
110 (when (and (eq (buffer-size) 0)
\r
111 notmuch-show-query-context)
\r
112 (notmuch-show-insert-forest
\r
113 - (notmuch-query-get-threads
\r
114 - (cons "--exclude=false" basic-args)))))
\r
115 + (notmuch-query-get-threads (append cli-args basic-args)))))
\r
117 (jit-lock-register #'notmuch-show-buttonise-links)
\r