Re: changing behaviour of notmuch show --part=1

  • From: David Bremner <david@xxxxxxxxxxx>
  • To: Daniel Kahn Gillmor <dkg@xxxxxxxxxxxxxxxxx>, notmuch@xxxxxxxxxxxxxxx, notmuch@xxxxxxxxxxxxx
  • Date: Tue, 23 May 2017 08:17:27 -0300

Daniel Kahn Gillmor <dkg@xxxxxxxxxxxxxxxxx> writes:


2) Allow-varying-output: Consider the previous behaviour a bug, fixed by
   using gmime-3.0.  This makes it hard for people to rely on, although
   how one relies on it currently since it varies by message is a
   mystery.

3) Fix the alleged bug: special case the output of the body with
   gmime-2.6 to avoid outputting headers.

i favor (2) for the short term, while treating (3) as an open bug to be
fixed.

thanks for identifying this, David.

       --dkg

(2) is essentially implimented by

    id:20170523005351.15431-3-david@xxxxxxxxxxx

Jeff Stedfast wrote the following code for (3) on the gmime-devel list;
it needs to be conditionalized on GMIME_MAJOR_VERSION, and tested.

,----

|  This is a bit of a hack, but...

|  cache = g_mime_header_list_get_stream (object->headers);
|  g_object_ref (cache);
|  g_mime_header_list_set_stream (object->headers, NULL);

|  g_mime_object_write_to_stream (object, ostream);

|  g_mime_header_list_set_stream (object->headers, cache);
|  g_object_unref (cache);

`----

Other related posts: