Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 13BEF429E42 for ; Fri, 16 Aug 2013 13:27:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M8eADsbr+jKt for ; Fri, 16 Aug 2013 13:27:21 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 02889429E3A for ; Fri, 16 Aug 2013 13:27:20 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id C22BC100051; Fri, 16 Aug 2013 23:27:14 +0300 (EEST) From: Tomi Ollila To: Jani Nikula , Austin Clements , notmuch@notmuchmail.org Subject: Re: [PATCH v3 0/3] Clean up reply's encoding story In-Reply-To: <87fvu93ahu.fsf@nikula.org> References: <1376667343-10863-1-git-send-email-amdragon@mit.edu> <87fvu93ahu.fsf@nikula.org> User-Agent: Notmuch/0.16+3~g340c058 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Aug 2013 20:27:29 -0000 On Fri, Aug 16 2013, Jani Nikula wrote: > On Fri, 16 Aug 2013, Austin Clements wrote: >> This is v3 of id:1376587658-19202-1-git-send-email-amdragon@mit.edu. >> This addresses Jani's comment in id:87k3jl3ehe.fsf@nikula.org by >> treating errors while retrieving the original message's References >> header as if the original message didn't have a References header. It >> also adds a comment suggested by Jani on IRC. The diff from v2 is >> below. > > The series LGTM, and I in particular welcome the diffstat in patch 3! The series LGTM, and I in particular welcome the diffstat in patch 3! > BR, > Jani. Tomi > > >> >> diff --git a/notmuch-reply.c b/notmuch-reply.c >> index bfd0f51..ac46d02 100644 >> --- a/notmuch-reply.c >> +++ b/notmuch-reply.c >> @@ -31,6 +31,7 @@ show_reply_headers (GMimeMessage *message) >> stream_stdout = g_mime_stream_file_new (stdout); >> if (stream_stdout) { >> g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE); >> + /* Output RFC 2822 formatted (and RFC 2047 encoded) headers. */ >> g_mime_object_write_to_stream (GMIME_OBJECT(message), stream_stdout); >> g_object_unref(stream_stdout); >> } >> @@ -526,14 +527,15 @@ create_reply_message(void *ctx, >> "In-Reply-To", in_reply_to); >> >> orig_references = notmuch_message_get_header (message, "references"); >> - if (orig_references) { >> - references = talloc_asprintf (ctx, "%s%s%s", >> - *orig_references ? orig_references : "", >> - *orig_references ? " " : "", >> - in_reply_to); >> - g_mime_object_set_header (GMIME_OBJECT (reply), >> - "References", references); >> - } >> + if (!orig_references) >> + /* Treat errors like missing References headers. */ >> + orig_references = ""; >> + references = talloc_asprintf (ctx, "%s%s%s", >> + *orig_references ? orig_references : "", >> + *orig_references ? " " : "", >> + in_reply_to); >> + g_mime_object_set_header (GMIME_OBJECT (reply), >> + "References", references); >> >> return reply; >> } >> >> >> _______________________________________________ >> notmuch mailing list >> notmuch@notmuchmail.org >> http://notmuchmail.org/mailman/listinfo/notmuch > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch