<p dir="ltr">Gmime doesn't do anything standards incompliant, so I'd prefer patching the test suite. Which is also why I'd like to work around this in notmuch.</p>
<div class="gmail_quote">On Nov 11, 2013 4:59 PM, "Tomi Ollila" <<a href="mailto:tomi.ollila@iki.fi">tomi.ollila@iki.fi</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Nov 11 2013, David Bremner <<a href="mailto:david@tethera.net">david@tethera.net</a>> wrote:<br>
<br>
> Daniel Kahn Gillmor <<a href="mailto:dkg@fifthhorseman.net">dkg@fifthhorseman.net</a>> writes:<br>
><br>
>><br>
>> Please don't introduce this cruft into the notmuch codebase. It should<br>
>> be fixed in gmime, not worked-around notmuch.<br>
>><br>
>> I've just uploaded gmime 2.6.19-2 to unstable to address this issue.<br>
>><br>
><br>
> Hi Daniel;<br>
><br>
> Thanks a lot for that.<br>
><br>
> What I (still) wonder about is all the people not running Debian, in the<br>
> interval between the release of notmuch 0.17 and the next upstream<br>
> release of gmime (and propagation to various distros). Even on Debian,<br>
> building on testing and backports complicates things a bit.<br>
<br>
Something like this could also be used...<br>
<br>
diff --git a/notmuch-reply.c b/notmuch-reply.c<br>
index 9d6f843..2ab0f6e 100644<br>
--- a/notmuch-reply.c<br>
+++ b/notmuch-reply.c<br>
@@ -26,6 +26,7 @@<br>
static void<br>
show_reply_headers (GMimeMessage *message)<br>
{<br>
+#if ! GMIME_CHECK_VERSION(2,6,19)<br>
GMimeStream *stream_stdout = NULL;<br>
<br>
stream_stdout = g_mime_stream_file_new (stdout);<br>
@@ -35,6 +36,17 @@ show_reply_headers (GMimeMessage *message)<br>
g_mime_object_write_to_stream (GMIME_OBJECT(message), stream_stdout);<br>
g_object_unref(stream_stdout);<br>
}<br>
+#else<br>
+ char * msg = g_mime_object_to_string (GMIME_OBJECT(message));<br>
+ char * rp = strstr (msg, "References: ");<br>
+ if (rp) {<br>
+ fwrite (msg, 1, rp - msg + 12, stdout); // Up to 'References: '<br>
+ fputs (rp + 13, stdout);<br>
+ }<br>
+ else {<br>
+ fputs (msg, stdout);<br>
+ }<br>
+#endif<br>
}<br>
<br>
static void<br>
<br>
<br>
><br>
> d<br>
<br>
Tomi<br>
_______________________________________________<br>
notmuch mailing list<br>
<a href="mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a><br>
<a href="http://notmuchmail.org/mailman/listinfo/notmuch" target="_blank">http://notmuchmail.org/mailman/listinfo/notmuch</a><br>
</blockquote></div>