There is lots to tidy up here, but the series has balooned to 12 patches since since Austin posted id:1413181203-1676-1-git-send-email-aclements@csail.mit.edu So I figure I better post it to get some feedback. These are unmodified from Austin's post [WIP2 01/12] lib: Only sync modified message documents [WIP2 02/12] lib: Add per-message last modification tracking [WIP2 07/12] lib: Add "lastmod:" queries for filtering by last This has two small bug fixes, a typo and an extra * removed. [WIP2 03/12] lib: API to retrieve database revision and UUID Together, the next 5 patches implement output format 3 [WIP2 04/12] cli: add type introspection to sprinter type [WIP2 05/12] cli: add two sprinter utility functions [WIP2 06/12] cli/show: add extra element to structured output for [WIP2 08/12] cli/show: add lastmod to structured output [WIP2 09/12] cli/search: add metadata element to structured output These two do a trivial convesion of parts of the emacs interface to use the new format: [WIP2 10/12] emacs: convert notmuch-search to format-version 3 [WIP2 11/12] emacs: convert notmuch-tree to format-version 3 Finally, add db-revision argument. I'm not sure about the name, but I went with what Austin had written. This patch should probably be earlier in the sequence [WIP2 12/12] cli: add global option "--db-revision"