<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/notmuch-show.c, branch 0.7</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.7</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.7'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2011-06-29T02:19:16Z</updated>
<entry>
<title>Add part filename and content-id in notmuch show output if available.</title>
<updated>2011-06-29T02:19:16Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-05-28T22:03:47Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1a27b33f20da46a6f5643782dea84d04b6615ef6'/>
<id>urn:sha1:1a27b33f20da46a6f5643782dea84d04b6615ef6</id>
<content type='text'>
Before the change, notmuch show output had filename only for
parts with "Content-Disposition: attachment".  But parts with
inline disposition may have filename as well.

The patch makes notmuch show always output filename if available,
independent of Content-Disposition.  Both JSON and text output
formats are changed.

Also, the patch adds Content-id to text output format of notmuch
show.

The main goal of these changes is to have filenames on Emacs
buttons for inline attachments.  In particular, this is very
helpful for inline patches.

Note: text format changes may require updates in clients that use
it.  The changes are:

* text part header format changed from:

    ^Lpart{ ID: 2, Content-type: text/x-diff

  to:

    ^Lpart{ ID: 2, Filename: cool-feature.patch, Content-type: text/x-diff

* attachment format changed from:

    ^Lattachment{ ID: 4, Content-type: application/octet-stream
    Attachment: data.tar.bz2 (application/octet-stream)
    Non-text part: application/octet-stream
    ^Lattachment}

  to:

    ^Lattachment{ ID: 4, Filename: data.tar.bz2, Content-type: application/octet-stream
    Non-text part: application/octet-stream
    ^Lattachment}
</content>
</entry>
<entry>
<title>Use stock GMimeSession by default</title>
<updated>2011-06-04T00:42:54Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2011-06-03T23:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5143e5e840b5e9d95611f57fdc9d4b27af6f0564'/>
<id>urn:sha1:5143e5e840b5e9d95611f57fdc9d4b27af6f0564</id>
<content type='text'>
Our use of GMimeSession was unneeded boilerplate, and we weren't doing
anything with it.  This simplifies and clarifies that assumption.

If we want to do anything fancier later, the examples in the gmime
source are a reasonable source to work from in defining a new
GMimeSession derivative.

Since GMimeSession is going away in GMime 2.6, though, i don't
recommend using it.
</content>
</entry>
<entry>
<title>show: Avoid inadvertently closing stdout</title>
<updated>2011-06-03T22:24:44Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-28T21:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d5b4d950245605b84c56ce991fa3c59a073a70e5'/>
<id>urn:sha1:d5b4d950245605b84c56ce991fa3c59a073a70e5</id>
<content type='text'>
GMime has a nasty habit of taking ownership by default of any FILE*
handed to it va g_mime_stream_file_new. Specifically it will close the
FILE* when the stream is destroyed---even though GMime didn't open the
file itself.

To avoid this bad behavior, we have to carefully set_owner(FALSE)
after calling g_mime_stream_file_new. In the format_part_content_text
function, since commit d92146d3a6809f8ad940302af49cd99a0820665e we've
been calling g_mime_stream_file_new unconditionally, but only calling
g_mime_stream_file_set_owner(FALSE) conditionally.

This led to the FILE* being closed early when notmuch show output was
redirected to a file.

Fixing this fixes the test-suite cases that broke with the previous
commit, (which added redirected "notmuch show" calls to the test suite
to expose this bug).

Edited-by: Carl Worth &lt;cworth@cworth.org&gt; with a new commit message to
explain the bug and fix.
</content>
</entry>
<entry>
<title>Rename signerstatustostring to signer_status_to_string</title>
<updated>2011-05-31T23:20:56Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2011-05-31T23:20:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1a96c4078cd24ac51788f07fb0e2e745dc680681'/>
<id>urn:sha1:1a96c4078cd24ac51788f07fb0e2e745dc680681</id>
<content type='text'>
Otherwise, it's fartoohardformetoreadthis code.
</content>
</entry>
<entry>
<title>Reduce some excessive indentation.</title>
<updated>2011-05-31T23:18:45Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2011-05-31T23:18:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2d1356e8dbfbf0361233b38e4fac030b86c4e03e'/>
<id>urn:sha1:2d1356e8dbfbf0361233b38e4fac030b86c4e03e</id>
<content type='text'>
I prefer checking a condition and returning early rather than making
large blocks of code within a function conditional.
</content>
</entry>
<entry>
<title>show: Remove some dead code from show_text_part_content</title>
<updated>2011-05-31T23:16:04Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2011-05-31T23:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f744b050b16d2a8c7223e06f7e071914ae05645e'/>
<id>urn:sha1:f744b050b16d2a8c7223e06f7e071914ae05645e</id>
<content type='text'>
Now that this function registers an internal error if called with a
non-text part, we can remove the conditions for multipart and
message-part content types.
</content>
</entry>
<entry>
<title>notmuch show: Don't do text conversions for non-text parts</title>
<updated>2011-05-31T23:13:21Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2011-05-31T23:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=10a48e0566db1566e6c0221b9f9927ac123a0c1f'/>
<id>urn:sha1:10a48e0566db1566e6c0221b9f9927ac123a0c1f</id>
<content type='text'>
This fixes the recently-added test case (in test/multipart)
demonstrating corruption of binary parts that happen to contain CRLF
pairs.

We restore the original code from show_one_part_content to
format_part_content_raw. Then, for good measure, we rename
show_part_content to the more descriptive show_text_part_content and
add an internal error if it is ever called with a non-text part.
</content>
</entry>
<entry>
<title>Add decryption of PGP/MIME-encrypted parts with --decrypt.</title>
<updated>2011-05-27T23:22:00Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-26T01:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2e653db38fc38dee92b2ee0564e27921132e7232'/>
<id>urn:sha1:2e653db38fc38dee92b2ee0564e27921132e7232</id>
<content type='text'>
This adds support for decrypting PGP/MIME-encrypted parts to
notmuch-show and notmuch-reply.  The --decrypt option implies
--verify.  Once decryption (and possibly signature verification) is
done, a new part_encstatus formatter is emitted, the part_sigstatus
formatter is emitted, and the entire multipart/encrypted part is
replaced by the contents of the encrypted part.

At the moment only a json part_encstatus formatting function is
available, even though decryption is done for all formats.  Emacs
support to follow.
</content>
</entry>
<entry>
<title>Add signature verification of PGP/MIME-signed parts with --verify.</title>
<updated>2011-05-27T23:22:00Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-26T01:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8b18efe171ef80cbb238a9446137c39908755d2d'/>
<id>urn:sha1:8b18efe171ef80cbb238a9446137c39908755d2d</id>
<content type='text'>
This is primarily for notmuch-show, although the functionality is
added to show-message.  Once signatures are processed a new
part_sigstatus formatter is emitted, and the entire multipart/signed
part is replaced with the contents of the signed part.

At the moment only a json part_sigstatus formatting function is
available.  Emacs support to follow.

The original work for this patch was done by

  Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;

whose help with this functionality I greatly appreciate.
</content>
</entry>
<entry>
<title>Break up format-&gt;part function into part_start and part_content functions.</title>
<updated>2011-05-27T23:18:57Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-05-26T01:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d92146d3a6809f8ad940302af49cd99a0820665e'/>
<id>urn:sha1:d92146d3a6809f8ad940302af49cd99a0820665e</id>
<content type='text'>
Future improvements (eg. crypto support) will require adding new part
header.  By breaking up the output of part headers from the output of
part content, we can easily out new part headers with new formatting
functions.
</content>
</entry>
</feed>
