Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D5F80431FD2 for ; Tue, 24 Nov 2009 20:55:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hw8zPRqeWfwF for ; Tue, 24 Nov 2009 20:55:20 -0800 (PST) Received: from tau.jukie.net (tau.jukie.net [216.239.93.128]) by olra.theworths.org (Postfix) with ESMTP id 6BC40431FC0 for ; Tue, 24 Nov 2009 20:55:18 -0800 (PST) Received: from localhost.localdomain (oxygen.jukie.net [10.10.10.8]) by tau.jukie.net (Postfix) with ESMTP id E97CDC00F86; Tue, 24 Nov 2009 23:55:17 -0500 (EST) From: Bart Trojanowski To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:54:35 -0500 Message-Id: <1259124875-28212-4-git-send-email-bart@jukie.net> X-Mailer: git-send-email 1.6.4.4.2.gc2f148 In-Reply-To: <1259124875-28212-3-git-send-email-bart@jukie.net> References: <1259124875-28212-1-git-send-email-bart@jukie.net> <1259124875-28212-2-git-send-email-bart@jukie.net> <1259124875-28212-3-git-send-email-bart@jukie.net> Cc: Bart Trojanowski Subject: [notmuch] [PATCH 3/3] notmuch-show: identify which messages printed matched the query string X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 04:55:22 -0000 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 --- notmuch-show.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 8599c6c..e9f0883 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"); -- 1.6.4.4.2.gc2f148