From: Jani Nikula Date: Fri, 16 Aug 2013 15:45:33 +0000 (+0300) Subject: Re: [PATCH v3 0/3] Clean up reply's encoding story X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a28a07dea0aa67070d3a94d59fc2f3f9ae4965eb;p=notmuch-archives.git Re: [PATCH v3 0/3] Clean up reply's encoding story --- diff --git a/7d/b2a8fd09a0426a7a4661723ec6c97dbb535af2 b/7d/b2a8fd09a0426a7a4661723ec6c97dbb535af2 new file mode 100644 index 000000000..f06e2eb00 --- /dev/null +++ b/7d/b2a8fd09a0426a7a4661723ec6c97dbb535af2 @@ -0,0 +1,126 @@ +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 4D8BF431E82 + for ; Fri, 16 Aug 2013 08:45:36 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 uaJpWoU0Rt0k for ; + Fri, 16 Aug 2013 08:45:31 -0700 (PDT) +Received: from mail-bk0-f51.google.com (mail-bk0-f51.google.com + [209.85.214.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id AAE35429E3A + for ; Fri, 16 Aug 2013 08:45:31 -0700 (PDT) +Received: by mail-bk0-f51.google.com with SMTP id mx10so678030bkb.38 + for ; Fri, 16 Aug 2013 08:45:30 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=x-gm-message-state:from:to:cc:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=AgQpkDYjEcDnjxtT1Xu/cilieFEgjrfTHTpGLe8eNoE=; + b=pWz2YhTq1aJbFKyg4/42P9ud+6HcfwDghcQF2OoGSPtY+oRv76ftG4LxwtQX/CIxAk + 6MCjyGXXGdc36eY/G2wvFacr5qvO/H67H4ROB0HYY8LVK3mvJ7kTBnvwb8EGRQcmF0Ir + RDHmBkpBfKPimpj8PHowFvklNZQHhu2itwQSloclijRUA0VNeBhw3X3BV1B5XsuY515s + ChFmK6+sofviRVMQU7zFLP4mvGmWCFkygFV/iAnJiHMUaERqv/gf49NhCYKaNGT9zClf + eQc7FnAczYuAs42x2bh+2FOLhVZ2vlfAqHRxVwzL4v2GJ0L46pwyWLWf4COlL49MnVWU + J9Jg== +X-Gm-Message-State: + ALoCoQmtslgiCgLvuLVxY7eodv9gwO2i6Cz6eH4VKGWSXBmWuqQ0JNm7ZL87r88heQQT/gTbH08n +X-Received: by 10.205.10.132 with SMTP id pa4mr1289414bkb.15.1376667930295; + Fri, 16 Aug 2013 08:45:30 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id if11sm424185bkc.15.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Fri, 16 Aug 2013 08:45:29 -0700 (PDT) +From: Jani Nikula +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH v3 0/3] Clean up reply's encoding story +In-Reply-To: <1376667343-10863-1-git-send-email-amdragon@mit.edu> +References: <1376667343-10863-1-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.15.2+227~g40b2846 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 16 Aug 2013 18:45:33 +0300 +Message-ID: <87fvu93ahu.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain +Cc: tomi.ollila@iki.fi +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 15:45:37 -0000 + +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! + +BR, +Jani. + + +> +> 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