1 Return-Path: <ethan.glasser.camp@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 D9DB1431FB6
\r
6 for <notmuch@notmuchmail.org>; Mon, 15 Oct 2012 19:18:20 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id FM7Hhw4-13d2 for <notmuch@notmuchmail.org>;
\r
17 Mon, 15 Oct 2012 19:18:17 -0700 (PDT)
\r
18 Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com
\r
19 [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id DFE5B431FAE
\r
22 for <notmuch@notmuchmail.org>; Mon, 15 Oct 2012 19:18:16 -0700 (PDT)
\r
23 Received: by mail-qa0-f46.google.com with SMTP id c26so2300548qad.5
\r
24 for <notmuch@notmuchmail.org>; Mon, 15 Oct 2012 19:18:15 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:in-reply-to:references:user-agent:date
\r
27 :message-id:mime-version:content-type;
\r
28 bh=SWR65n0tLZFcxPVAQ0AXrHnCvOkg1foQtkMcCBlZ2Ps=;
\r
29 b=z9a8kiJusZqkGVOh4fJog3ZCers/Mlybf7G+IoRVKLsJtt845msOMUJszAllJ8Um0L
\r
30 IB9BUMG3ZnLFaDPEwCpZdPTk1jiENhF9u1XVnO3MUET+33l7xCM3KEeYEmfemjjtLmQL
\r
31 nWcfwPu440BCPzLgcYvIyw+g1MmI4Np+NQRLkdjaFvqqpNqL2yx7nQ6IIwnPabX5SPns
\r
32 VACrYSbX9dF3hBGvUNF6kj/GhfR5Rw97in83wIA7Nj9fYp4J/duCMtGEsf0GE483sDiE
\r
33 jF20ToQLS4K4l6FE/umt2BkebSGBrjMjZ81nRP2cyr5/mNk+ypE133zO+0/8XHl5kiJb
\r
35 Received: by 10.49.130.234 with SMTP id oh10mr32205530qeb.42.1350353895215;
\r
36 Mon, 15 Oct 2012 19:18:15 -0700 (PDT)
\r
37 Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80])
\r
38 by mx.google.com with ESMTPS id ck18sm17218493qab.7.2012.10.15.19.18.13
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Mon, 15 Oct 2012 19:18:14 -0700 (PDT)
\r
41 From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
\r
42 To: Pieter Praet <pieter@praet.org>, David Bremner <david@tethera.net>,
\r
43 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
44 Subject: Re: [PATCH v2 4/6] emacs: add optional predicate arg to
\r
46 In-Reply-To: <1330122640-18895-5-git-send-email-pieter@praet.org>
\r
47 References: <87wr7xqpuf.fsf@rocinante.cs.unb.ca>
\r
48 <1330122640-18895-1-git-send-email-pieter@praet.org>
\r
49 <1330122640-18895-5-git-send-email-pieter@praet.org>
\r
50 User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.3.1
\r
51 (x86_64-pc-linux-gnu)
\r
52 Date: Mon, 15 Oct 2012 22:18:12 -0400
\r
53 Message-ID: <87r4oz88ij.fsf@betacantrips.com>
\r
55 Content-Type: text/plain; charset=us-ascii
\r
56 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Tue, 16 Oct 2012 02:18:21 -0000
\r
71 Pieter Praet <pieter@praet.org> writes:
\r
73 > * emacs/notmuch-show.el (notmuch-show-mapc):
\r
75 > If provided with optional argument PREDICATE, only call
\r
76 > FUNCTION if calling PREDICATE returns non-nil.
\r
78 > Also correct original docstring: 's/thread/buffer/'.
\r
81 This patch was marked stale, but isn't.
\r
83 > -(defun notmuch-show-mapc (function)
\r
84 > - "Iterate through all messages in the current thread with
\r
85 > +(defun notmuch-show-mapc (function &optional predicate)
\r
86 > + "Iterate through all messages in the current buffer with
\r
87 > `notmuch-show-goto-message-next' and call FUNCTION for side
\r
91 > +If provided with optional argument PREDICATE, only call
\r
92 > +FUNCTION if calling PREDICATE returns non-nil."
\r
94 > (goto-char (point-min))
\r
95 > - (loop do (funcall function)
\r
96 > + (loop do (if predicate
\r
97 > + (if (funcall predicate)
\r
98 > + (funcall function))
\r
99 > + (funcall function))
\r
101 I don't like the way this if-structure looks, since I have to squint to
\r
102 see whether the "else" clause matches the inner or the outer "if". Maybe
\r
103 change the inner "if" to a "when" or an "and"?
\r