This patch adds the following features to notmuch-show.c a --headers-only option which just outputs the headers of a message (i.e. it omits the bodies). This is not strictly needed by notmuch-pick.el but it gives a speed-up of at least a factor of a two; moreover it reduces the memory usage of the emacs part hugely. a --sort=oldest-first|newest-first option to allow notmuch-pick.el to choose the sort order. a --thread=none option to tell it to return just the matching messages with not threading information at all. This is used by notmuch-pick.el to display an unthreaded message view (e.g., for an inbox). It is also useful for displaying a single message in the pick view as show is much faster at showing a single message than the whole thread. The other options for --thread of --thread=entire|match replace the --entire-thread option. Presumably this should really be split into three separate patches, but advice on this is gratefully received! Thanks Mark