From: Jani Nikula <jani@nikula.org>
To: Felipe Contreras <felipe.contreras@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 2/3] reply: add message-id header
Date: Wed, 18 Apr 2012 13:09:50 +0000 [thread overview]
Message-ID: <87zka9b2zl.fsf@nikula.org> (raw)
In-Reply-To: <1334752753-23970-3-git-send-email-felipe.contreras@gmail.com>
On Wed, 18 Apr 2012 15:39:12 +0300, Felipe Contreras <felipe.contreras@gmail.com> wrote:
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> notmuch-reply.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/notmuch-reply.c b/notmuch-reply.c
> index 0949d9f..d796bb2 100644
> --- a/notmuch-reply.c
> +++ b/notmuch-reply.c
> @@ -464,6 +464,8 @@ create_reply_message(void *ctx,
> {
> const char *subject, *from_addr = NULL;
> const char *in_reply_to, *orig_references, *references;
> + const char *message_id;
> + char *simple_from;
>
> /* The 1 means we want headers in a "pretty" order. */
> GMimeMessage *reply = g_mime_message_new (1);
> @@ -488,6 +490,8 @@ create_reply_message(void *ctx,
> if (from_addr == NULL)
> from_addr = notmuch_config_get_user_primary_email (config);
>
> + simple_from = talloc_strdup (ctx, from_addr);
> +
> from_addr = talloc_asprintf (ctx, "%s <%s>",
> notmuch_config_get_user_name (config),
> from_addr);
> @@ -508,6 +512,13 @@ create_reply_message(void *ctx,
> g_mime_object_set_header (GMIME_OBJECT (reply),
> "References", references);
>
> + message_id = talloc_asprintf (ctx, "<%lu-notmuch-%s>",
> + time(NULL),
> + simple_from);
This duplicates the problem in "notmuch compose", hinting that you
should probably have the message-id generation in one place only.
I do wonder whether the emacs ui / message mode will add a duplicate
message-id rather than override this.
BR,
Jani.
> + g_mime_object_set_header (GMIME_OBJECT (reply),
> + "Message-ID", message_id);
> + talloc_free (simple_from);
> +
> return reply;
> }
>
> --
> 1.7.10
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
next prev parent reply other threads:[~2012-04-18 13:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 12:39 [PATCH v2 0/3] composing patches Felipe Contreras
2012-04-18 12:39 ` [PATCH v2 1/3] Add 'compose' command Felipe Contreras
2012-04-18 13:06 ` Jani Nikula
2012-04-18 13:34 ` Felipe Contreras
2012-04-18 13:43 ` Dmitry Kurochkin
2012-04-18 14:11 ` Felipe Contreras
2012-04-18 14:41 ` Dmitry Kurochkin
2012-04-18 15:45 ` Felipe Contreras
2012-04-18 14:20 ` Jani Nikula
2012-04-18 15:39 ` Felipe Contreras
2012-04-18 16:00 ` Tomi Ollila
2012-04-18 16:10 ` Dmitry Kurochkin
2012-04-18 16:34 ` Jani Nikula
2012-04-19 9:31 ` Tomi Ollila
2012-04-19 14:03 ` Felipe Contreras
2012-04-18 12:39 ` [PATCH v2 2/3] reply: add message-id header Felipe Contreras
2012-04-18 13:09 ` Jani Nikula [this message]
2012-04-18 17:27 ` Adam Wolfe Gordon
2012-04-18 19:44 ` Felipe Contreras
2012-04-18 12:39 ` [PATCH v2 3/3] reply: add user-agent field Felipe Contreras
2012-04-18 17:36 ` [PATCH v2 0/3] composing patches Adam Wolfe Gordon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zka9b2zl.fsf@nikula.org \
--to=jani@nikula.org \
--cc=felipe.contreras@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).