--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 4D8BF431E82\r
+ for <notmuch@notmuchmail.org>; Fri, 16 Aug 2013 08:45:36 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id uaJpWoU0Rt0k for <notmuch@notmuchmail.org>;\r
+ Fri, 16 Aug 2013 08:45:31 -0700 (PDT)\r
+Received: from mail-bk0-f51.google.com (mail-bk0-f51.google.com\r
+ [209.85.214.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id AAE35429E3A\r
+ for <notmuch@notmuchmail.org>; Fri, 16 Aug 2013 08:45:31 -0700 (PDT)\r
+Received: by mail-bk0-f51.google.com with SMTP id mx10so678030bkb.38\r
+ for <notmuch@notmuchmail.org>; Fri, 16 Aug 2013 08:45:30 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=x-gm-message-state:from:to:cc:subject:in-reply-to:references\r
+ :user-agent:date:message-id:mime-version:content-type;\r
+ bh=AgQpkDYjEcDnjxtT1Xu/cilieFEgjrfTHTpGLe8eNoE=;\r
+ b=pWz2YhTq1aJbFKyg4/42P9ud+6HcfwDghcQF2OoGSPtY+oRv76ftG4LxwtQX/CIxAk\r
+ 6MCjyGXXGdc36eY/G2wvFacr5qvO/H67H4ROB0HYY8LVK3mvJ7kTBnvwb8EGRQcmF0Ir\r
+ RDHmBkpBfKPimpj8PHowFvklNZQHhu2itwQSloclijRUA0VNeBhw3X3BV1B5XsuY515s\r
+ ChFmK6+sofviRVMQU7zFLP4mvGmWCFkygFV/iAnJiHMUaERqv/gf49NhCYKaNGT9zClf\r
+ eQc7FnAczYuAs42x2bh+2FOLhVZ2vlfAqHRxVwzL4v2GJ0L46pwyWLWf4COlL49MnVWU\r
+ J9Jg==\r
+X-Gm-Message-State:\r
+ ALoCoQmtslgiCgLvuLVxY7eodv9gwO2i6Cz6eH4VKGWSXBmWuqQ0JNm7ZL87r88heQQT/gTbH08n\r
+X-Received: by 10.205.10.132 with SMTP id pa4mr1289414bkb.15.1376667930295;\r
+ Fri, 16 Aug 2013 08:45:30 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+ [88.195.111.91])\r
+ by mx.google.com with ESMTPSA id if11sm424185bkc.15.1969.12.31.16.00.00\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Fri, 16 Aug 2013 08:45:29 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v3 0/3] Clean up reply's encoding story\r
+In-Reply-To: <1376667343-10863-1-git-send-email-amdragon@mit.edu>\r
+References: <1376667343-10863-1-git-send-email-amdragon@mit.edu>\r
+User-Agent: Notmuch/0.15.2+227~g40b2846 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 16 Aug 2013 18:45:33 +0300\r
+Message-ID: <87fvu93ahu.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 16 Aug 2013 15:45:37 -0000\r
+\r
+On Fri, 16 Aug 2013, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> This is v3 of id:1376587658-19202-1-git-send-email-amdragon@mit.edu.\r
+> This addresses Jani's comment in id:87k3jl3ehe.fsf@nikula.org by\r
+> treating errors while retrieving the original message's References\r
+> header as if the original message didn't have a References header. It\r
+> also adds a comment suggested by Jani on IRC. The diff from v2 is\r
+> below.\r
+\r
+The series LGTM, and I in particular welcome the diffstat in patch 3!\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+>\r
+> diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+> index bfd0f51..ac46d02 100644\r
+> --- a/notmuch-reply.c\r
+> +++ b/notmuch-reply.c\r
+> @@ -31,6 +31,7 @@ show_reply_headers (GMimeMessage *message)\r
+> stream_stdout = g_mime_stream_file_new (stdout);\r
+> if (stream_stdout) {\r
+> g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);\r
+> + /* Output RFC 2822 formatted (and RFC 2047 encoded) headers. */\r
+> g_mime_object_write_to_stream (GMIME_OBJECT(message), stream_stdout);\r
+> g_object_unref(stream_stdout);\r
+> }\r
+> @@ -526,14 +527,15 @@ create_reply_message(void *ctx,\r
+> "In-Reply-To", in_reply_to);\r
+> \r
+> orig_references = notmuch_message_get_header (message, "references");\r
+> - if (orig_references) {\r
+> - references = talloc_asprintf (ctx, "%s%s%s",\r
+> - *orig_references ? orig_references : "",\r
+> - *orig_references ? " " : "",\r
+> - in_reply_to);\r
+> - g_mime_object_set_header (GMIME_OBJECT (reply),\r
+> - "References", references);\r
+> - }\r
+> + if (!orig_references)\r
+> + /* Treat errors like missing References headers. */\r
+> + orig_references = "";\r
+> + references = talloc_asprintf (ctx, "%s%s%s",\r
+> + *orig_references ? orig_references : "",\r
+> + *orig_references ? " " : "",\r
+> + in_reply_to);\r
+> + g_mime_object_set_header (GMIME_OBJECT (reply),\r
+> + "References", references);\r
+> \r
+> return reply;\r
+> }\r
+>\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r