[PATCH 4/8] lib: extend private string map API with iterators
[notmuch-archives.git] / 9c / 8b927373e52cd182eb2c8c2be10c9432d77a9e
1 Return-Path: <felipe.contreras@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 A292E41A54C\r
6         for <notmuch@notmuchmail.org>; Thu,  9 Dec 2010 14:32:57 -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 d+S88QQd0dEX for <notmuch@notmuchmail.org>;\r
17         Thu,  9 Dec 2010 14:32:57 -0800 (PST)\r
18 Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com\r
19         [209.85.214.52])\r
20         by olra.theworths.org (Postfix) with ESMTP id 14110431FD0\r
21         for <notmuch@notmuchmail.org>; Thu,  9 Dec 2010 14:32:56 -0800 (PST)\r
22 Received: by mail-bw0-f52.google.com with SMTP id 4so3710179bwz.39\r
23         for <notmuch@notmuchmail.org>; Thu, 09 Dec 2010 14:32:56 -0800 (PST)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
25         h=domainkey-signature:received:received:from:to:cc:subject:date\r
26         :message-id:x-mailer:in-reply-to:references;\r
27         bh=tgyLTsj/kUCsuggzDQyTNQN3MZD9BNxtc9TUXZf+c5c=;\r
28         b=iU+wsURgDKcxombql8knNj61+l14bAlQ/PjmYTnV4i9rtjB9j8cZ/Rv3u6W6IubThv\r
29         sOWqK7pxm1cMFh4frLn7mkyvnMJ1UbA8LFhlgbAwN6xRJjfHJ+j20wLpzGdu1/ajfJJm\r
30         VJQEVzjMJBr4i830N7JPyh0mrper1q94PdT4M=\r
31 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
32         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
33         b=RyrlCYhRXK/mKYzf3LbyANRrLWrxS2IYyo9dRGUAU7ovLxhm+U+XnvPyJmiBNDWrF7\r
34         99s/rElhNn55Nx8k0TQxSMmc3L4oTm3kP0TYcJdJxOsVUDCFlIv/y3b9YhU5l+cwIPhu\r
35         19CWlxRICsmHm4Esoo99FDvbKT2CoEdUqbRkA=\r
36 Received: by 10.204.46.130 with SMTP id j2mr4020128bkf.169.1291933976702;\r
37         Thu, 09 Dec 2010 14:32:56 -0800 (PST)\r
38 Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80])\r
39         by mx.google.com with ESMTPS id\r
40         a17sm1220372bku.11.2010.12.09.14.32.55\r
41         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
42         Thu, 09 Dec 2010 14:32:56 -0800 (PST)\r
43 From: Felipe Contreras <felipe.contreras@gmail.com>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH 1/3] reply: add message-id header\r
46 Date: Fri, 10 Dec 2010 00:32:50 +0200\r
47 Message-Id: <1291933972-7186-2-git-send-email-felipe.contreras@gmail.com>\r
48 X-Mailer: git-send-email 1.7.3.2\r
49 In-Reply-To: <1291933972-7186-1-git-send-email-felipe.contreras@gmail.com>\r
50 References: <1291933972-7186-1-git-send-email-felipe.contreras@gmail.com>\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Thu, 09 Dec 2010 22:32:57 -0000\r
64 \r
65 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\r
66 ---\r
67  notmuch-reply.c |   11 +++++++++++\r
68  1 files changed, 11 insertions(+), 0 deletions(-)\r
69 \r
70 diff --git a/notmuch-reply.c b/notmuch-reply.c\r
71 index 23d04b8..53a12c5 100644\r
72 --- a/notmuch-reply.c\r
73 +++ b/notmuch-reply.c\r
74 @@ -447,6 +447,8 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_\r
75      notmuch_message_t *message;\r
76      const char *subject, *from_addr = NULL;\r
77      const char *in_reply_to, *orig_references, *references;\r
78 +    const char *message_id;\r
79 +    char *simple_from;\r
80  \r
81      for (messages = notmuch_query_search_messages (query);\r
82          notmuch_messages_valid (messages);\r
83 @@ -476,6 +478,8 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_\r
84         if (from_addr == NULL)\r
85             from_addr = notmuch_config_get_user_primary_email (config);\r
86  \r
87 +       simple_from = talloc_strdup (ctx, from_addr);\r
88 +\r
89         from_addr = talloc_asprintf (ctx, "%s <%s>",\r
90                                      notmuch_config_get_user_name (config),\r
91                                      from_addr);\r
92 @@ -496,6 +500,13 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_\r
93         g_mime_object_set_header (GMIME_OBJECT (reply),\r
94                                   "References", references);\r
95  \r
96 +       message_id = talloc_asprintf (ctx, "<%lu-notmuch-%s>",\r
97 +                                     time(NULL),\r
98 +                                     simple_from);\r
99 +       g_mime_object_set_header (GMIME_OBJECT (reply),\r
100 +                                 "Message-ID", message_id);\r
101 +       talloc_free (simple_from);\r
102 +\r
103         show_reply_headers (reply);\r
104  \r
105         g_object_unref (G_OBJECT (reply));\r
106 -- \r
107 1.7.3.2\r
108 \r