From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E21BD431E84 for ; Mon, 11 Nov 2013 06:59:29 -0800 (PST) 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 t8enFY4Es3L8 for ; Mon, 11 Nov 2013 06:59:25 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id BC014431FD2 for ; Mon, 11 Nov 2013 06:59:25 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 499F7100033; Mon, 11 Nov 2013 16:59:19 +0200 (EET) From: Tomi Ollila To: David Bremner , Daniel Kahn Gillmor , notmuch Subject: Re: fix for failing tests with gmime 2.6.19 In-Reply-To: <87iovzywua.fsf@zancas.localnet> References: <1384100482-15453-1-git-send-email-david@tethera.net> <52805350.70004@fifthhorseman.net> <87iovzywua.fsf@zancas.localnet> User-Agent: Notmuch/0.16+119~g219c55f (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: Mon, 11 Nov 2013 14:59:30 -0000 On Mon, Nov 11 2013, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> >> Please don't introduce this cruft into the notmuch codebase. It should >> be fixed in gmime, not worked-around notmuch. >> >> I've just uploaded gmime 2.6.19-2 to unstable to address this issue. >> > > Hi Daniel; > > Thanks a lot for that. > > What I (still) wonder about is all the people not running Debian, in the > interval between the release of notmuch 0.17 and the next upstream > release of gmime (and propagation to various distros). Even on Debian, > building on testing and backports complicates things a bit. Something like this could also be used... diff --git a/notmuch-reply.c b/notmuch-reply.c index 9d6f843..2ab0f6e 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -26,6 +26,7 @@ static void show_reply_headers (GMimeMessage *message) { +#if ! GMIME_CHECK_VERSION(2,6,19) GMimeStream *stream_stdout = NULL; stream_stdout = g_mime_stream_file_new (stdout); @@ -35,6 +36,17 @@ show_reply_headers (GMimeMessage *message) g_mime_object_write_to_stream (GMIME_OBJECT(message), stream_stdout); g_object_unref(stream_stdout); } +#else + char * msg = g_mime_object_to_string (GMIME_OBJECT(message)); + char * rp = strstr (msg, "References: "); + if (rp) { + fwrite (msg, 1, rp - msg + 12, stdout); // Up to 'References: ' + fputs (rp + 13, stdout); + } + else { + fputs (msg, stdout); + } +#endif } static void > > d Tomi