Re: notmuch-emacs should correctly handle signature status on reply
[notmuch-archives.git] / d6 / dd2b9818ceab40a3e8768fa45b8b8f0365053f
1 Return-Path: <bgamari.foss@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 DDBB5431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 18 Mar 2011 05:32:44 -0700 (PDT)\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 AKD9PI20L7AP for <notmuch@notmuchmail.org>;\r
17         Fri, 18 Mar 2011 05:32:44 -0700 (PDT)\r
18 Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com\r
19         [209.85.216.174]) (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 E2925431FB5\r
22         for <notmuch@notmuchmail.org>; Fri, 18 Mar 2011 05:32:43 -0700 (PDT)\r
23 Received: by qyk7 with SMTP id 7so757960qyk.5\r
24         for <notmuch@notmuchmail.org>; Fri, 18 Mar 2011 05:32:41 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:from:to:subject:in-reply-to:references\r
27         :user-agent:date:message-id:mime-version:content-type;\r
28         bh=r+3xKcpGeEcA+iUAwj8MApi2a1hLtxr/3x9LRbltOyc=;\r
29         b=jXLzhP4biiQJ3J0fU//0JyXV4P1cGqkuGK/iK9wyFpUri6IRTRVWa29Wym2qhN9WZ8\r
30         jL0J+m6x6iX+3hQxtjzbvnUwubme6USRbPuJTQ+P/WJ5U/ki4mXxW8a5u256Ow0QYkEj\r
31         4mIUdHPQXrwYLIPah914i7XcevGhmwYn1/7rM=\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
33         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
34         :mime-version:content-type;\r
35         b=JAnwOq/iFN1kLe9iWgKmehLDm1s0jJgzLkyBov4RjH+q8Mcp56luggfaMbyWVFfjrh\r
36         ujfEKdin4G1Nc1oMvYYPD3+QCFV4jN1imnPccEtSR9D1iBbfiKJMZ6fbJ0lTqHs7iorf\r
37         p8w31r2uVb0SuXZa0yQG7OdlwYeQz+xr895/A=\r
38 Received: by 10.224.18.129 with SMTP id w1mr802680qaa.382.1300451561805;\r
39         Fri, 18 Mar 2011 05:32:41 -0700 (PDT)\r
40 Received: from localhost (pool-96-240-215-129.spfdma.east.verizon.net\r
41         [96.240.215.129])\r
42         by mx.google.com with ESMTPS id s32sm2195910qco.2.2011.03.18.05.32.39\r
43         (version=TLSv1/SSLv3 cipher=OTHER);\r
44         Fri, 18 Mar 2011 05:32:39 -0700 (PDT)\r
45 From: Ben Gamari <bgamari.foss@gmail.com>\r
46 To: Jesse Rosenthal <jrosenthal@jhu.edu>, notmuch <notmuch@notmuchmail.org>\r
47 Subject: Re: My mail configuration\r
48 In-Reply-To: <877hbwevf4.fsf@lucky.home>\r
49 References: <87tyfu3k5a.fsf@gmail.com> <877hbwevf4.fsf@lucky.home>\r
50 User-Agent: Notmuch/0.5-64-gdd23272 (http://notmuchmail.org) Emacs/23.1.1\r
51         (x86_64-pc-linux-gnu)\r
52 Date: Fri, 18 Mar 2011 08:32:36 -0400\r
53 Message-ID: <87zkos623f.fsf@gmail.com>\r
54 MIME-Version: 1.0\r
55 Content-Type: text/plain; charset=us-ascii\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Fri, 18 Mar 2011 12:32:45 -0000\r
69 \r
70 On Fri, 18 Mar 2011 03:31:59 -0400, Jesse Rosenthal <jrosenthal@jhu.edu> wrote:\r
71 > > # Freeze new messages\r
72 > > q_new = notmuch.Query(db, 'tag:new')\r
73 > > n_msgs = 0\r
74 > > for msg in q_new.search_messages():\r
75 > >         msg.freeze()\r
76 > >         n_msgs += 1\r
77\r
78 > It seems like every time you iterate over `q_new.search_messages()', you\r
79 > run a new search on tag:new. So at the end, when you thaw the messages,\r
80 > you're running that search again, from scratch:\r
81\r
82 Ouch, yes, you are absolutely right. Thankfully, as you noted, notmuch\r
83 seems to be cleaning up after me when I exit.\r
84 \r
85 > > # Tag remaining new items for inbox\r
86 > > tag_search(db, 'tag:new', '+inbox', '-new')\r
87 > > \r
88 > > # Thaw new messages\r
89 > > for msg in q_new.search_messages():\r
90 > >         msg.thaw()\r
91\r
92 > But there are no longer and "tag:new"s, so there shouldn't be any\r
93 > results for `q_new.search_messages()', should there? It seems like\r
94 > it's thawing 0 messages. Playing around with it, it doesn't seem to make\r
95 > a difference, so perhaps thawing is unneccessary if you're exiting after\r
96 > tagging. Or am I misunderstanding something?\r
97\r
98 > By the way, my understanding of the bindings is that you can avoid\r
99 > running the new searches by dumping a Messages object into a list. So,\r
100 > you can do something like:\r
101\r
102 >     new_msg_obj = q_new.search_messages()\r
103 >     new_msg_list = [m for m in new_msg_obj]\r
104\r
105 > and then deal with the list from there on out. Not sure if that would\r
106 > buy you much performance over running the query repeatedly, but it\r
107 > couldn't hurt, and it would seem closer to the effect that you're aiming\r
108 > at (since the members of the list would be set from the first query, and\r
109 > therefore you'd be thawing the same elements you froze in the first\r
110 > place).\r
111\r
112 This is true, although I'd be worried about memory usage when there are\r
113 many new messages. I suppose this probably won't be a problem, however,\r
114 and even in the worst case it would probably only be a few hundred\r
115 MB. I'll consider this.\r
116 \r
117 Thanks for your note!\r
118 \r
119 Cheers,\r
120 \r
121 - Ben\r