unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Tomi Ollila <tomi.ollila@iki.fi>
Cc: Notmuch Mail <notmuch@notmuchmail.org>,
	Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Subject: Re: fix for failing tests with gmime 2.6.19
Date: Mon, 11 Nov 2013 18:01:14 +0200	[thread overview]
Message-ID: <CAB+hUn8muZLYu5YPYtAgq-i37cU+K-2-T4DGqsTjkKBSULELwQ@mail.gmail.com> (raw)
In-Reply-To: <m2txfjyoft.fsf@guru.guru-group.fi>

[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]

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.
On Nov 11, 2013 4:59 PM, "Tomi Ollila" <tomi.ollila@iki.fi> wrote:

> 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
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
>

[-- Attachment #2: Type: text/html, Size: 2830 bytes --]

  reply	other threads:[~2013-11-11 16:08 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
2013-11-11 16:01       ` Jani Nikula [this message]
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=CAB+hUn8muZLYu5YPYtAgq-i37cU+K-2-T4DGqsTjkKBSULELwQ@mail.gmail.com \
    --to=jani@nikula.org \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /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).