1 Return-Path: <tomi.ollila@iki.fi>
\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 E4A25431E82
\r
6 for <notmuch@notmuchmail.org>; Sun, 1 Apr 2012 10:09:43 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 Az+wXl-Hg8cN for <notmuch@notmuchmail.org>;
\r
16 Sun, 1 Apr 2012 10:09:42 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 94FF3431FAF
\r
19 for <notmuch@notmuchmail.org>; Sun, 1 Apr 2012 10:09:42 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 9244D68055; Sun, 1 Apr 2012 20:09:38 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
\r
24 Subject: Re: [PATCH] emacs: do not modify the alist passed to
\r
25 notmuch-sort-saved-searches
\r
26 In-Reply-To: <1333291883-1030-1-git-send-email-jani@nikula.org>
\r
27 References: <1333291883-1030-1-git-send-email-jani@nikula.org>User-Agent:
\r
28 Notmuch/0.12+77~gee11800 (http://notmuchmail.org) Emacs/23.3.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Sun, 01 Apr 2012 20:09:38 +0300
\r
34 Message-ID: <m2bonbidkd.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain; charset=us-ascii
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Sun, 01 Apr 2012 17:09:44 -0000
\r
51 On Sun, Apr 01 2012, Jani Nikula <jani@nikula.org> wrote:
\r
53 > Sort modifies its input as a side effect. Pass it a copy in
\r
54 > notmuch-sort-saved-searches to not modify the notmuch-saved-searches
\r
65 > Earlier version by Daniel Schoepe and discussion in thread starting at
\r
66 > id:"1330633478-1974-1-git-send-email-daniel@schoepe.org".
\r
68 > emacs/notmuch-hello.el | 2 +-
\r
69 > 1 files changed, 1 insertions(+), 1 deletions(-)
\r
71 > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
72 > index e9caade..8e37761 100644
\r
73 > --- a/emacs/notmuch-hello.el
\r
74 > +++ b/emacs/notmuch-hello.el
\r
77 > (defun notmuch-sort-saved-searches (alist)
\r
78 > "Generate an alphabetically sorted saved searches alist."
\r
79 > - (sort alist (lambda (a b) (string< (car a) (car b)))))
\r
80 > + (sort (copy-sequence alist) (lambda (a b) (string< (car a) (car b)))))
\r
82 > (defcustom notmuch-saved-search-sort-function nil
\r
83 > "Function used to sort the saved searches for the notmuch-hello view.
\r
87 > _______________________________________________
\r
88 > notmuch mailing list
\r
89 > notmuch@notmuchmail.org
\r
90 > http://notmuchmail.org/mailman/listinfo/notmuch
\r