From: Bart Trojanowski Date: Wed, 25 Nov 2009 04:54:35 +0000 (-0500) Subject: notmuch-show: identify which messages printed matched the query string X-Git-Tag: 0.1~315 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=c984fc43cc841b1453a10f92c227466a2c676364;ds=sidebyside notmuch-show: identify which messages printed matched the query string The show command outputs all messages in the threads that match the search-terms. This patch introduces a 'match:[01]' entry to the 'message{' line output by the show command. Value of 1 indicates that the message is matching the search expression. Signed-off-by: Bart Trojanowski --- diff --git a/notmuch-show.c b/notmuch-show.c index edebacaa..f189e943 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -155,9 +155,10 @@ show_message (void *ctx, notmuch_message_t *message, int indent) const char *name, *value; unsigned int i; - printf ("\fmessage{ id:%s depth:%d filename:%s\n", + printf ("\fmessage{ id:%s depth:%d match:%d filename:%s\n", notmuch_message_get_message_id (message), indent, + notmuch_message_get_flag (message, NOTMUCH_MSG_FLAG_MATCHING_SEARCH), notmuch_message_get_filename (message)); printf ("\fheader{\n");