Re: [PATCH v3] emacs: add stash support for git send-email command line
[notmuch-archives.git] / 77 / fee9aee758059f3bc2f947fe62a7ddf164a845
1 Return-Path: <dmitry.kurochkin@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 4AE2E431FAF\r
6         for <notmuch@notmuchmail.org>; Sun,  4 Mar 2012 18:23:24 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \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 paNqH1081TRY for <notmuch@notmuchmail.org>;\r
17         Sun,  4 Mar 2012 18:23:23 -0800 (PST)\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
19         [209.85.214.53]) (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 58D91431FAE\r
22         for <notmuch@notmuchmail.org>; Sun,  4 Mar 2012 18:23:23 -0800 (PST)\r
23 Received: by bkwj4 with SMTP id j4so3177411bkw.26\r
24         for <notmuch@notmuchmail.org>; Sun, 04 Mar 2012 18:23:22 -0800 (PST)\r
25 Received-SPF: pass (google.com: domain of dmitry.kurochkin@gmail.com\r
26         designates 10.205.137.15 as permitted sender)\r
27         client-ip=10.205.137.15; \r
28 Authentication-Results: mr.google.com; spf=pass (google.com: domain of\r
29         dmitry.kurochkin@gmail.com designates 10.205.137.15 as\r
30         permitted sender) smtp.mail=dmitry.kurochkin@gmail.com;\r
31         dkim=pass header.i=dmitry.kurochkin@gmail.com\r
32 Received: from mr.google.com ([10.205.137.15])\r
33         by 10.205.137.15 with SMTP id im15mr9673084bkc.54.1330914202048\r
34         (num_hops = 1); Sun, 04 Mar 2012 18:23:22 -0800 (PST)\r
35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
36         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
37         :mime-version:content-type;\r
38         bh=FQ9q39l5je6wROyDiS82KQs0Hzz8a3EMiwFuGy+ByWw=;\r
39         b=LvXC3hJKBKwZYQUSv90tblDsOXSG1VBewLDbTS/PffaQZxVXdSMs1LcUx4C6SngHIs\r
40         8JkYVwXS5uiAotX/NfbAg28o3TJqlTPILlITRAA9gByBGHD0PZRZt9s8Tix2iTCROoQ3\r
41         qnSejNVldBMGRB+xXMQFUpD1cGmlFgftX7QoUSMgX4n5G7faPuK2pLdlq8KjqGERi0FH\r
42         iJSE/aVRZQ2ykdZcU23bh8GO3GtEfhQHTrwm7YH6IICBlPQj+i6sRNw9roitWQD/NhHU\r
43         HSa1Ru8RJhg1BCHvnHuRI+SpVUKV1vneAxgArtBx5cu4kfhNdOwcp4Bl7BL7dQpFQipe\r
44         cOWQ==\r
45 Received: by 10.205.137.15 with SMTP id im15mr7652289bkc.54.1330914201950;\r
46         Sun, 04 Mar 2012 18:23:21 -0800 (PST)\r
47 Received: from localhost ([91.144.186.21])\r
48         by mx.google.com with ESMTPS id u14sm10256664bkp.2.2012.03.04.18.23.19\r
49         (version=TLSv1/SSLv3 cipher=OTHER);\r
50         Sun, 04 Mar 2012 18:23:21 -0800 (PST)\r
51 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
52 To: Daniel Schoepe <daniel@schoepe.org>, notmuch@notmuchmail.org\r
53 Subject: Re: [PATCH v2] emacs: Pass a copy to\r
54         notmuch-saved-search-sort-function\r
55 In-Reply-To: <1330633478-1974-2-git-send-email-daniel@schoepe.org>\r
56 References: <1330613059-5130-1-git-send-email-daniel@schoepe.org>\r
57         <1330633478-1974-1-git-send-email-daniel@schoepe.org>\r
58         <1330633478-1974-2-git-send-email-daniel@schoepe.org>\r
59 User-Agent: Notmuch/0.11.1+288~g4b3af0e (http://notmuchmail.org) Emacs/23.3.1\r
60         (x86_64-pc-linux-gnu)\r
61 Date: Mon, 05 Mar 2012 06:21:52 +0400\r
62 Message-ID: <87booblrcv.fsf@gmail.com>\r
63 MIME-Version: 1.0\r
64 Content-Type: text/plain; charset=us-ascii\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Mon, 05 Mar 2012 02:23:24 -0000\r
78 \r
79 On Thu,  1 Mar 2012 21:24:38 +0100, Daniel Schoepe <daniel@schoepe.org> wrote:\r
80 > notmuch-saved-search-sort-function might destructively modify its\r
81 > input (`sort' does that, for instance), so it should not be given\r
82 > notmuch-saved-searches directly.\r
83 > ---\r
84 \r
85 -1\r
86 \r
87 I think we should require `notmuch-saved-search-sort-function' not to\r
88 have side effects.  Current documentation should be more clear about\r
89 this.  We need to fix `notmuch-sort-saved-searches' to copy the list\r
90 before calling `sort'.  But we should not do it in\r
91 `notmuch-hello-insert-saved-searches' for any sorting function (which\r
92 may not need this copying).\r
93 \r
94 Regards,\r
95   Dmitry\r
96 \r
97 >  emacs/notmuch-hello.el |    5 ++++-\r
98 >  1 files changed, 4 insertions(+), 1 deletions(-)\r
99\r
100 > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
101 > index aad373d..e089290 100644\r
102 > --- a/emacs/notmuch-hello.el\r
103 > +++ b/emacs/notmuch-hello.el\r
104 > @@ -575,7 +575,10 @@ Complete list of currently available key bindings:\r
105 >    (let ((searches (notmuch-hello-query-counts\r
106 >                  (if notmuch-saved-search-sort-function\r
107 >                      (funcall notmuch-saved-search-sort-function\r
108 > -                             notmuch-saved-searches)\r
109 > +                             ;; Use a copy, since the sorting\r
110 > +                             ;; function may have side effects,\r
111 > +                             ;; e.g. if it just `sort's the input.\r
112 > +                             (copy-sequence notmuch-saved-searches))\r
113 >                    notmuch-saved-searches)\r
114 >                  :show-empty-searches notmuch-show-empty-saved-searches))\r
115 >       found-target-pos)\r
116 > -- \r
117 > 1.7.9.1\r
118\r
119 > _______________________________________________\r
120 > notmuch mailing list\r
121 > notmuch@notmuchmail.org\r
122 > http://notmuchmail.org/mailman/listinfo/notmuch\r