These are some preliminary patches to add a --output argument to notmuch show.
notmuch show --format=json --output=from,subject ${query} or notmuch show --format=json --output=to,body ${query} I'd like to implement a bit finer control (to get message-id's only is not possible right now), and it needs documentation and a test, but I thought I'd toss this out there to see what people think.