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 D9C6B431FB6
\r
6 for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 12:44:50 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 0F5j6bNZWZ2N for <notmuch@notmuchmail.org>;
\r
17 Wed, 18 Apr 2012 12:44:46 -0700 (PDT)
\r
18 Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com
\r
19 [209.85.215.181]) (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 8E4CB431FAE
\r
22 for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 12:44:46 -0700 (PDT)
\r
23 Received: by eaa1 with SMTP id 1so3172616eaa.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 12:44:43 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
\r
27 :cc:content-type:content-transfer-encoding;
\r
28 bh=/QG+mVpMMlbTXah2fPcRbD/jb6xmPqz55l7VkCv8vj0=;
\r
29 b=Ly1pHN7lWTEhhUVO1cM2QogM9iDihVzrHoi4dEvpDnrjskavsjC5vXoH5hqaxrLcFm
\r
30 JBh5yNYeRiK9RSFPpVg3El5hot6X9hg6k/a97Wmj3RQnFZcojrqbtu8AkSg+vwJ1h3pX
\r
31 O91gPuN5Q9OURtwDzBLmpgzfsKyKdhfP0qSr9f92PyCEoeKg/bn7FcOPvQRwLzqtOlkl
\r
32 MWOrr1hQWk8RDgrQrPFGMnaGJgLS5TNat0a2INNnDRkhCDa+LUI4zt+f17P2JIXURd6H
\r
33 CBr6IsOsCiKRZ/GetzPhRmBjlqHgj6O4/qHEESRW4yV6xEClCT2Fm1/7s8M6NcjWBGaG
\r
36 Received: by 10.213.6.195 with SMTP id a3mr313287eba.78.1334778283733; Wed, 18
\r
37 Apr 2012 12:44:43 -0700 (PDT)
\r
38 Received: by 10.213.19.67 with HTTP; Wed, 18 Apr 2012 12:44:43 -0700 (PDT)
\r
39 In-Reply-To: <87zka9b2zl.fsf@nikula.org>
\r
40 References: <1334752753-23970-1-git-send-email-felipe.contreras@gmail.com>
\r
41 <1334752753-23970-3-git-send-email-felipe.contreras@gmail.com>
\r
42 <87zka9b2zl.fsf@nikula.org>
\r
43 Date: Wed, 18 Apr 2012 22:44:43 +0300
\r
45 <CAMP44s1q5rKUu7AnKtDLn3OxG0iPDnsNoLdOOLXUFw0b7cKx6A@mail.gmail.com>
\r
46 Subject: Re: [PATCH v2 2/3] reply: add message-id header
\r
47 From: Felipe Contreras <felipe.contreras@gmail.com>
\r
48 To: Jani Nikula <jani@nikula.org>
\r
49 Content-Type: text/plain; charset=UTF-8
\r
50 Content-Transfer-Encoding: quoted-printable
\r
51 Cc: notmuch@notmuchmail.org
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Wed, 18 Apr 2012 19:44:51 -0000
\r
66 On Wed, Apr 18, 2012 at 4:09 PM, Jani Nikula <jani@nikula.org> wrote:
\r
67 > On Wed, 18 Apr 2012 15:39:12 +0300, Felipe Contreras <felipe.contreras@gm=
\r
69 >> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
\r
71 >> =C2=A0notmuch-reply.c | =C2=A0 11 +++++++++++
\r
72 >> =C2=A01 file changed, 11 insertions(+)
\r
74 >> diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
75 >> index 0949d9f..d796bb2 100644
\r
76 >> --- a/notmuch-reply.c
\r
77 >> +++ b/notmuch-reply.c
\r
78 >> @@ -464,6 +464,8 @@ create_reply_message(void *ctx,
\r
80 >> =C2=A0 =C2=A0 =C2=A0const char *subject, *from_addr =3D NULL;
\r
81 >> =C2=A0 =C2=A0 =C2=A0const char *in_reply_to, *orig_references, *referenc=
\r
83 >> + =C2=A0 =C2=A0const char *message_id;
\r
84 >> + =C2=A0 =C2=A0char *simple_from;
\r
86 >> =C2=A0 =C2=A0 =C2=A0/* The 1 means we want headers in a "pretty" order. =
\r
88 >> =C2=A0 =C2=A0 =C2=A0GMimeMessage *reply =3D g_mime_message_new (1);
\r
89 >> @@ -488,6 +490,8 @@ create_reply_message(void *ctx,
\r
90 >> =C2=A0 =C2=A0 =C2=A0if (from_addr =3D=3D NULL)
\r
91 >> =C2=A0 =C2=A0 =C2=A0 from_addr =3D notmuch_config_get_user_primary_email=
\r
94 >> + =C2=A0 =C2=A0simple_from =3D talloc_strdup (ctx, from_addr);
\r
96 >> =C2=A0 =C2=A0 =C2=A0from_addr =3D talloc_asprintf (ctx, "%s <%s>",
\r
97 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
\r
98 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_config_get_user_name (conf=
\r
100 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
\r
101 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from_addr);
\r
102 >> @@ -508,6 +512,13 @@ create_reply_message(void *ctx,
\r
103 >> =C2=A0 =C2=A0 =C2=A0g_mime_object_set_header (GMIME_OBJECT (reply),
\r
104 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
\r
105 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "References", references);
\r
107 >> + =C2=A0 =C2=A0message_id =3D talloc_asprintf (ctx, "<%lu-notmuch-%s>",
\r
108 >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
\r
109 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 time(NULL),
\r
110 >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
\r
111 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 simple_from);
\r
113 > This duplicates the problem in "notmuch compose", hinting that you
\r
114 > should probably have the message-id generation in one place only.
\r
116 Hopefully in the future 'notmuch reply' would be merged onto 'notmuch
\r
117 compose --reply' or something. So this Message-ID code would be in one
\r