summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Trojanowski <bart@jukie.net>2009-11-24 23:34:15 -0500
committerBart Trojanowski <bart@jukie.net>2009-11-25 00:46:44 -0500
commitb9e96ccb0d5242033704ff81fee0c720772a312f (patch)
treefb62aeca96b55327d9f365d56f64cd30aff2f787
parent62878f71c2f2f1f8aabc6eeb3cab116bd38522db (diff)
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 <bart@jukie.net>
-rw-r--r--notmuch-show.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index edebaca..f189e94 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");