1 Return-Path: <pieter@praet.org>
\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 89357416017
\r
6 for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 14:33:32 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id WGIxG7V3Gd4X for <notmuch@notmuchmail.org>;
\r
16 Fri, 24 Feb 2012 14:33:31 -0800 (PST)
\r
17 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com
\r
18 [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 321D9415D32
\r
21 for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 14:33:30 -0800 (PST)
\r
22 Received: by wibhi8 with SMTP id hi8so2008668wib.26
\r
23 for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 14:33:28 -0800 (PST)
\r
24 Received-SPF: pass (google.com: domain of pieter@praet.org designates
\r
25 10.180.86.134 as permitted sender) client-ip=10.180.86.134;
\r
26 Authentication-Results: mr.google.com;
\r
27 spf=pass (google.com: domain of pieter@praet.org
\r
28 designates 10.180.86.134 as permitted sender)
\r
29 smtp.mail=pieter@praet.org
\r
30 Received: from mr.google.com ([10.180.86.134])
\r
31 by 10.180.86.134 with SMTP id p6mr8878423wiz.0.1330122808960 (num_hops
\r
32 = 1); Fri, 24 Feb 2012 14:33:28 -0800 (PST)
\r
34 Received: by 10.180.86.134 with SMTP id p6mr7172366wiz.0.1330122808879;
\r
35 Fri, 24 Feb 2012 14:33:28 -0800 (PST)
\r
36 Received: from localhost ([109.131.181.26])
\r
37 by mx.google.com with ESMTPS id cs4sm14678582wib.8.2012.02.24.14.33.28
\r
38 (version=TLSv1/SSLv3 cipher=OTHER);
\r
39 Fri, 24 Feb 2012 14:33:28 -0800 (PST)
\r
40 From: Pieter Praet <pieter@praet.org>
\r
41 To: David Bremner <david@tethera.net>,
\r
42 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
43 Subject: [PATCH v2 4/6] emacs: add optional predicate arg to
\r
45 Date: Fri, 24 Feb 2012 23:30:38 +0100
\r
46 Message-Id: <1330122640-18895-5-git-send-email-pieter@praet.org>
\r
47 X-Mailer: git-send-email 1.7.8.1
\r
48 In-Reply-To: <1330122640-18895-1-git-send-email-pieter@praet.org>
\r
49 References: <87wr7xqpuf.fsf@rocinante.cs.unb.ca>
\r
50 <1330122640-18895-1-git-send-email-pieter@praet.org>
\r
52 ALoCoQnkNJMxbNjmSVpFTNz2xGhCnfMyK3XRwvEGsz9WKbZ1B8M20ULZ52MsgHXyg+ZEaYt+YtlT
\r
53 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\r
57 List-Id: "Use and development of the notmuch mail system."
\r
58 <notmuch.notmuchmail.org>
\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
62 List-Post: <mailto:notmuch@notmuchmail.org>
\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
66 X-List-Received-Date: Fri, 24 Feb 2012 22:33:32 -0000
\r
68 * emacs/notmuch-show.el (notmuch-show-mapc):
\r
70 If provided with optional argument PREDICATE, only call
\r
71 FUNCTION if calling PREDICATE returns non-nil.
\r
73 Also correct original docstring: 's/thread/buffer/'.
\r
75 emacs/notmuch-show.el | 14 ++++++++++----
\r
76 1 files changed, 10 insertions(+), 4 deletions(-)
\r
78 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
79 index aa9ccee..6adbdc0 100644
\r
80 --- a/emacs/notmuch-show.el
\r
81 +++ b/emacs/notmuch-show.el
\r
82 @@ -1272,13 +1272,19 @@ (defun notmuch-show-goto-message-previous ()
\r
83 (notmuch-show-move-to-message-top)
\r
86 -(defun notmuch-show-mapc (function)
\r
87 - "Iterate through all messages in the current thread with
\r
88 +(defun notmuch-show-mapc (function &optional predicate)
\r
89 + "Iterate through all messages in the current buffer with
\r
90 `notmuch-show-goto-message-next' and call FUNCTION for side
\r
94 +If provided with optional argument PREDICATE, only call
\r
95 +FUNCTION if calling PREDICATE returns non-nil."
\r
97 (goto-char (point-min))
\r
98 - (loop do (funcall function)
\r
99 + (loop do (if predicate
\r
100 + (if (funcall predicate)
\r
101 + (funcall function))
\r
102 + (funcall function))
\r
103 while (notmuch-show-goto-message-next))))
\r
105 ;; Functions relating to the visibility of messages and their
\r