From 0e086fc19ba8ca1cc68f95bab07ca09934e3346c Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 18 Jan 2015 15:19:23 +0100 Subject: [PATCH] Re: [PATCH v2 1/3] search: Separately report matching and non-matching authors. --- 9c/658c537a43671b7708c3c549b63e828bb05dc5 | 81 +++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 9c/658c537a43671b7708c3c549b63e828bb05dc5 diff --git a/9c/658c537a43671b7708c3c549b63e828bb05dc5 b/9c/658c537a43671b7708c3c549b63e828bb05dc5 new file mode 100644 index 000000000..6d2611d74 --- /dev/null +++ b/9c/658c537a43671b7708c3c549b63e828bb05dc5 @@ -0,0 +1,81 @@ +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 2CE8A431FB6 + for ; Sun, 18 Jan 2015 06:20:28 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.438 +X-Spam-Level: ** +X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled +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 fieNFDkJeVjm for ; + Sun, 18 Jan 2015 06:20:25 -0800 (PST) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4E848431FAF + for ; Sun, 18 Jan 2015 06:20:25 -0800 (PST) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1YCqhU-0006xZ-V1; Sun, 18 Jan 2015 14:19:36 +0000 +Received: (nullmailer pid 24147 invoked by uid 1000); Sun, 18 Jan 2015 + 14:19:23 -0000 +From: David Bremner +To: David Edmondson , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 1/3] search: Separately report matching and + non-matching authors. +In-Reply-To: <1414172643-28270-2-git-send-email-dme@dme.org> +References: <1414172643-28270-1-git-send-email-dme@dme.org> + <1414172643-28270-2-git-send-email-dme@dme.org> +User-Agent: Notmuch/0.19+27~g29ffde4 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Sun, 18 Jan 2015 15:19:23 +0100 +Message-ID: <871tms9no4.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Sun, 18 Jan 2015 14:20:28 -0000 + +David Edmondson writes: + +> In addition to the 'authors' attribute of each search result, include +> 'authors_matched' and 'authors_non_matched' attributes. Both +> attributes are always included and are formatted as a list of +> authors. If there are no matching authors, the 'authors_non_matched' +> attribute is set to the empty list. +> --- + +It would be nicer if the tests were repaired in the same commit, or +minimally marked broken. + +> static int +> do_search_threads (sprinter_t *format, +> notmuch_query_t *query, +> @@ -152,6 +253,10 @@ do_search_threads (sprinter_t *format, +> format->integer (format, total); +> format->map_key (format, "authors"); +> format->string (format, authors); +> + if (_enumerate_authors (format, thread) < 0) { +> + fprintf (stderr, "Out of memory\n"); +> + return 1; +> + } + +Maybe I'm just blind, but I don't see how enumerate authors ever returns +anything other than 0. + -- 2.26.2