unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>,
	Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
	notmuch <notmuch@notmuchmail.org>
Subject: Re: fix for failing tests with gmime 2.6.19
Date: Mon, 11 Nov 2013 16:59:18 +0200	[thread overview]
Message-ID: <m2txfjyoft.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87iovzywua.fsf@zancas.localnet>

On Mon, Nov 11 2013, David Bremner <david@tethera.net> wrote:

> Daniel Kahn Gillmor <dkg@fifthhorseman.net> 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

  parent reply	other threads:[~2013-11-11 14:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 16:21 fix for failing tests with gmime 2.6.19 David Bremner
2013-11-10 16:21 ` [PATCH 1/2] test: add optional workaround for gmime bug David Bremner
2013-11-10 16:21 ` [PATCH 2/2] test: work around gmime bug using notmuch_reply_sanitize David Bremner
2013-11-11  3:15   ` [Patch v2 1/2] test: add optional workaround for gmime bug David Bremner
2013-11-11  3:15     ` [Patch v2 2/2] test: work around gmime bug using notmuch_reply_sanitize David Bremner
2013-11-11  3:47 ` fix for failing tests with gmime 2.6.19 Daniel Kahn Gillmor
2013-11-11 11:57   ` David Bremner
2013-11-11 13:42     ` David Bremner
2013-11-16 20:16       ` Jameson Graef Rollins
2013-11-16 23:00         ` David Bremner
2013-11-11 14:59     ` Tomi Ollila [this message]
2013-11-11 16:01       ` Jani Nikula
2013-11-18 17:54 ` Tomi Ollila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2txfjyoft.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).