--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 20CD3431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 3 Mar 2012 13:37:04 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id lFNG5V4ePaj4 for <notmuch@notmuchmail.org>;\r
+ Sat, 3 Mar 2012 13:37:02 -0800 (PST)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+ [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 2E446431FAE\r
+ for <notmuch@notmuchmail.org>; Sat, 3 Mar 2012 13:37:02 -0800 (PST)\r
+Received: by lahc1 with SMTP id c1so3532774lah.26\r
+ for <notmuch@notmuchmail.org>; Sat, 03 Mar 2012 13:36:59 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of jani@nikula.org designates\r
+ 10.152.135.148 as permitted sender) client-ip=10.152.135.148; \r
+Authentication-Results: mr.google.com;\r
+ spf=pass (google.com: domain of jani@nikula.org\r
+ designates 10.152.135.148 as permitted sender)\r
+ smtp.mail=jani@nikula.org\r
+Received: from mr.google.com ([10.152.135.148])\r
+ by 10.152.135.148 with SMTP id ps20mr13370101lab.20.1330810619185\r
+ (num_hops = 1); Sat, 03 Mar 2012 13:36:59 -0800 (PST)\r
+Received: by 10.152.135.148 with SMTP id ps20mr11005413lab.20.1330810619090;\r
+ Sat, 03 Mar 2012 13:36:59 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
+ [84.248.80.253])\r
+ by mx.google.com with ESMTPS id hv2sm14791084lbb.9.2012.03.03.13.36.56\r
+ (version=SSLv3 cipher=OTHER); Sat, 03 Mar 2012 13:36:57 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Daniel Schoepe <daniel@schoepe.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2] emacs: Pass a copy to\r
+ notmuch-saved-search-sort-function\r
+In-Reply-To: <1330633478-1974-2-git-send-email-daniel@schoepe.org>\r
+References: <1330613059-5130-1-git-send-email-daniel@schoepe.org>\r
+ <1330633478-1974-1-git-send-email-daniel@schoepe.org>\r
+ <1330633478-1974-2-git-send-email-daniel@schoepe.org>\r
+User-Agent: Notmuch/0.11.1+289~ga123fab (http://notmuchmail.org) Emacs/23.3.1\r
+ (i686-pc-linux-gnu)\r
+Date: Sat, 03 Mar 2012 23:36:54 +0200\r
+Message-ID: <87r4x9fjt5.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQkujERZmGNEBk3YRc7u+awb/tsGPftGnTFQdjhmJor2/3aL9Q6BnFq1bP8KhRTSORzOQYNG\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 03 Mar 2012 21:37:04 -0000\r
+\r
+On Thu, 1 Mar 2012 21:24:38 +0100, Daniel Schoepe <daniel@schoepe.org> wrote:\r
+> notmuch-saved-search-sort-function might destructively modify its\r
+> input (`sort' does that, for instance), so it should not be given\r
+> notmuch-saved-searches directly.\r
+\r
+Hi Daniel, thanks for fixing this. Works for me.\r
+\r
+Full disclosure: I put the broken sort usage there in the first place...\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+> ---\r
+> emacs/notmuch-hello.el | 5 ++++-\r
+> 1 files changed, 4 insertions(+), 1 deletions(-)\r
+> \r
+> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+> index aad373d..e089290 100644\r
+> --- a/emacs/notmuch-hello.el\r
+> +++ b/emacs/notmuch-hello.el\r
+> @@ -575,7 +575,10 @@ Complete list of currently available key bindings:\r
+> (let ((searches (notmuch-hello-query-counts\r
+> (if notmuch-saved-search-sort-function\r
+> (funcall notmuch-saved-search-sort-function\r
+> - notmuch-saved-searches)\r
+> + ;; Use a copy, since the sorting\r
+> + ;; function may have side effects,\r
+> + ;; e.g. if it just `sort's the input.\r
+> + (copy-sequence notmuch-saved-searches))\r
+> notmuch-saved-searches)\r
+> :show-empty-searches notmuch-show-empty-saved-searches))\r
+> found-target-pos)\r
+> -- \r
+> 1.7.9.1\r
+> \r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r