aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-search.c
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-12 22:01:44 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-11-12 22:01:44 -0800
commitc168e24174d32563ceb1a35d9bf1875c5bfeac25 (patch)
tree687584b0c99cdbd185fd23f73145fe5badb22cc8 /notmuch-search.c
parent184c327692b8a8fc08a8b9ddee28d7082c208c23 (diff)
notmuch search: Print the number of matched/total messages for each thread.
Note that we don't print the number of *unread* messages, but instead the number of messages that matched the search terms. This is in keeping with our philosophy that the inbox is nothing more than a search view. If we search for messages with an inbox tag, then that's what we'll get a count of. (And if somebody does want to see unread counts, then they can search for the "unread" tag.) Getting the number of matched messages is really nice when doing historical searches. For example in a search like: notmuch search tag:sent (where the "sent" tag has been applied to all messages originating from the user's email address)---here it's really nice to be able to see a thread where the user just mentioned one point [1/13] vs. really getting involved in the discussion [10/29].
Diffstat (limited to 'notmuch-search.c')
-rw-r--r--notmuch-search.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/notmuch-search.c b/notmuch-search.c
index 85f3514e..a0a71bbd 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -91,9 +91,11 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
date = notmuch_thread_get_oldest_date (thread);
relative_date = notmuch_time_relative_date (ctx, date);
- printf ("thread:%s %12s %s; %s",
+ printf ("thread:%s %12s [%d/%d] %s; %s",
notmuch_thread_get_thread_id (thread),
relative_date,
+ notmuch_thread_get_matched_messages (thread),
+ notmuch_thread_get_total_messages (thread),
notmuch_thread_get_authors (thread),
notmuch_thread_get_subject (thread));