1 Return-Path: <daniel@schoepe.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 5A851431FCB
\r
6 for <notmuch@notmuchmail.org>; Thu, 1 Mar 2012 12:24:54 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 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 qOjNJqrq3-0q for <notmuch@notmuchmail.org>;
\r
17 Thu, 1 Mar 2012 12:24:53 -0800 (PST)
\r
18 Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com
\r
19 [209.85.215.181]) (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 1DC52431FAF
\r
22 for <notmuch@notmuchmail.org>; Thu, 1 Mar 2012 12:24:49 -0800 (PST)
\r
23 Received: by eaa1 with SMTP id 1so504934eaa.26
\r
24 for <notmuch@notmuchmail.org>; Thu, 01 Mar 2012 12:24:49 -0800 (PST)
\r
25 Received-SPF: pass (google.com: domain of daniel@schoepe.org designates
\r
26 10.213.9.8 as permitted sender) client-ip=10.213.9.8;
\r
27 Authentication-Results: mr.google.com;
\r
28 spf=pass (google.com: domain of daniel@schoepe.org
\r
29 designates 10.213.9.8 as permitted sender)
\r
30 smtp.mail=daniel@schoepe.org;
\r
31 dkim=pass header.i=daniel@schoepe.org
\r
32 Received: from mr.google.com ([10.213.9.8])
\r
33 by 10.213.9.8 with SMTP id j8mr692921ebj.102.1330633489013 (num_hops =
\r
34 1); Thu, 01 Mar 2012 12:24:49 -0800 (PST)
\r
35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google;
\r
36 h=mime-version:from:to:cc:subject:date:message-id:x-mailer
\r
37 :in-reply-to:references;
\r
38 bh=ycvLYn4YlGE8Vp8BciYfo7uhNRzWJ3Ap6mGnbKZuM8c=;
\r
39 b=Jq1WBF2S8Iq9K0fA+SHpafNnwYM8W/WxjaPGFrWWqqsU0is6tGCmyi85mihE9pRK3w
\r
40 gG/yZgSmvqtsjT/qYjtVnowsVPf9Yc7+iXzCtNOqoB6hjZ49C3jCOqphxPE9ij3D5T+Q
\r
41 b39arZtyVPQI+DPEb1cluhFuBdvZfw40GM9z0=
\r
42 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
43 d=google.com; s=20120113;
\r
44 h=mime-version:from:to:cc:subject:date:message-id:x-mailer
\r
45 :in-reply-to:references:x-gm-message-state;
\r
46 bh=ycvLYn4YlGE8Vp8BciYfo7uhNRzWJ3Ap6mGnbKZuM8c=;
\r
47 b=W+Mm38U4lV5iMtceCXRjkmk59o6eEF7En9VL1uPyNkLuCu4aqSAG3woqPCKq0VN/A3
\r
48 0K8OS46MEqWfnw9FmV1bKlF189WhyhS1vKkGWh94l+RsZpSTdEEnInrG0pDCYYz5KZd5
\r
49 YYlLnG50RhYhOJ+LKBc+x0VK8PYqB41eabQCG4ofxJ8CAhyW9+ogJAonrrpnFfaUbA6j
\r
50 yJ9CIvWRZFElT4kSA6ApMfnEyk1eKsbVHzMxa+Pp4s7jOMsEGVd/C2Z6PSXWUFg92PHn
\r
51 OPMfzx6P/uQ0CLEjCch6S0Tk2PQaFbgPUUaie666TIklm/+3cNNZldNFVm/2k22oitz+
\r
54 Received: by 10.213.9.8 with SMTP id j8mr525815ebj.102.1330633488389;
\r
55 Thu, 01 Mar 2012 12:24:48 -0800 (PST)
\r
56 Received: from localhost (dslb-188-107-168-245.pools.arcor-ip.net.
\r
58 by mx.google.com with ESMTPS id n52sm11126487eea.5.2012.03.01.12.24.46
\r
59 (version=TLSv1/SSLv3 cipher=OTHER);
\r
60 Thu, 01 Mar 2012 12:24:47 -0800 (PST)
\r
61 From: Daniel Schoepe <daniel@schoepe.org>
\r
62 To: notmuch@notmuchmail.org
\r
63 Subject: [PATCH v2] emacs: Pass a copy to notmuch-saved-search-sort-function
\r
64 Date: Thu, 1 Mar 2012 21:24:38 +0100
\r
65 Message-Id: <1330633478-1974-2-git-send-email-daniel@schoepe.org>
\r
66 X-Mailer: git-send-email 1.7.9.1
\r
67 In-Reply-To: <1330633478-1974-1-git-send-email-daniel@schoepe.org>
\r
68 References: <1330613059-5130-1-git-send-email-daniel@schoepe.org>
\r
69 <1330633478-1974-1-git-send-email-daniel@schoepe.org>
\r
71 ALoCoQlqNdG0Zjt+gHWKmdd/SYWCdyXlFkDswf6J7SnASrZr6A8pNHuYVdy+f4X42tV8Z5r1pvs+
\r
72 X-BeenThere: notmuch@notmuchmail.org
\r
73 X-Mailman-Version: 2.1.13
\r
75 List-Id: "Use and development of the notmuch mail system."
\r
76 <notmuch.notmuchmail.org>
\r
77 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
78 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
79 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
80 List-Post: <mailto:notmuch@notmuchmail.org>
\r
81 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
82 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
83 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
84 X-List-Received-Date: Thu, 01 Mar 2012 20:24:54 -0000
\r
86 notmuch-saved-search-sort-function might destructively modify its
\r
87 input (`sort' does that, for instance), so it should not be given
\r
88 notmuch-saved-searches directly.
\r
90 emacs/notmuch-hello.el | 5 ++++-
\r
91 1 files changed, 4 insertions(+), 1 deletions(-)
\r
93 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
94 index aad373d..e089290 100644
\r
95 --- a/emacs/notmuch-hello.el
\r
96 +++ b/emacs/notmuch-hello.el
\r
97 @@ -575,7 +575,10 @@ Complete list of currently available key bindings:
\r
98 (let ((searches (notmuch-hello-query-counts
\r
99 (if notmuch-saved-search-sort-function
\r
100 (funcall notmuch-saved-search-sort-function
\r
101 - notmuch-saved-searches)
\r
102 + ;; Use a copy, since the sorting
\r
103 + ;; function may have side effects,
\r
104 + ;; e.g. if it just `sort's the input.
\r
105 + (copy-sequence notmuch-saved-searches))
\r
106 notmuch-saved-searches)
\r
107 :show-empty-searches notmuch-show-empty-saved-searches))
\r