]> git.cworth.org Git - obsolete/notmuch-old/commit
Add part filename and content-id in notmuch show output if available.
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Sat, 28 May 2011 22:03:47 +0000 (02:03 +0400)
committerCarl Worth <cworth@cworth.org>
Wed, 29 Jun 2011 02:19:16 +0000 (19:19 -0700)
commit1a27b33f20da46a6f5643782dea84d04b6615ef6
tree5657a12fad7c3ad083297b9e619d66314d4d4599
parenta854d06e92645350b7ec3f6cd1a10a2f6933104f
Add part filename and content-id in notmuch show output if available.

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}
notmuch-show.c