From 46d9f32092b41f61963e8a5c5929d8c3612f0158 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 27 Oct 2014 15:50:49 +0100 Subject: [PATCH] [PATCH v4 0/6] notmuch search --output=sender/recipients --- 15/ad5e96a13d8c5303d56000b5811115f966e418 | 110 ++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 15/ad5e96a13d8c5303d56000b5811115f966e418 diff --git a/15/ad5e96a13d8c5303d56000b5811115f966e418 b/15/ad5e96a13d8c5303d56000b5811115f966e418 new file mode 100644 index 000000000..71a4a00de --- /dev/null +++ b/15/ad5e96a13d8c5303d56000b5811115f966e418 @@ -0,0 +1,110 @@ +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 065BE431FC3 + for ; Mon, 27 Oct 2014 07:51:20 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 iKHkczHLTrTp for ; + Mon, 27 Oct 2014 07:51:14 -0700 (PDT) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id 8F883431FDC + for ; Mon, 27 Oct 2014 07:51:14 -0700 (PDT) +Received: from localhost (unknown [192.168.200.7]) + by max.feld.cvut.cz (Postfix) with ESMTP id 6FA035CCF92 + for ; Mon, 27 Oct 2014 15:51:12 +0100 (CET) +X-Virus-Scanned: IMAP STYX AMAVIS +Received: from max.feld.cvut.cz ([192.168.200.1]) + by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, + port 10044) with ESMTP id 8Ktvdcra6lOl for ; + Mon, 27 Oct 2014 15:51:08 +0100 (CET) +Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) + by max.feld.cvut.cz (Postfix) with ESMTP id 9A6055CCF98 + for ; Mon, 27 Oct 2014 15:51:07 +0100 (CET) +Received: from wsh by steelpick.2x.cz with local (Exim 4.84) + (envelope-from ) + id 1XildT-0000oQ-F2; Mon, 27 Oct 2014 15:51:07 +0100 +From: Michal Sojka +To: notmuch@notmuchmail.org +Subject: [PATCH v4 0/6] notmuch search --output=sender/recipients +Date: Mon, 27 Oct 2014 15:50:49 +0100 +Message-Id: <1414421455-3037-1-git-send-email-sojkam1@fel.cvut.cz> +X-Mailer: git-send-email 2.1.1 +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: Mon, 27 Oct 2014 14:51:20 -0000 + +Hi all, + +this is v4 of the search --output=address series. It obsoletes v3 that +starts at id:1413150093-8383-1-git-send-email-sojkam1@fel.cvut.cz. + +It addresses most comments made by Mark Walters and others. In +addition to v3, it also implements new --output=count (also suggested +by Mark). This required changes even in the initial patches of the +series but the result is cleaner code. + +Detailed changes from v3: + +- `o' renamed to `opt'. +- Conversion of --output from keyword to keyword-flags is now a + separate patch. +- Structured output formats print name and address separately. +- Added test for --format=json. +- Changed --filter-by default to nameaddr. In v2, the default was + addrfold, in v3 the default was no filtering at all. I believe that + Mark's suggestion to make nameaddr the default is good trade off. +- Added new --output=count +- Minor style fixes +- Few typos fixed +- There is no way to output unfiltered (duplicite) addresses. + Hopefully, the introduction of --output=count is sufficient + replacement for this "feature". + +Cheers, +-Michal + + +Jani Nikula (1): + cli: Add support for parsing keyword-flag arguments + +Michal Sojka (5): + cli: search: Refactor passing of command line options + cli: search: Convert --output to keyword-flag argument + cli: search: Add --output={sender,recipients} + cli: search: Add configurable way to filter out duplicate addresses + cli: search: Add --output=count + + command-line-arguments.c | 6 +- + command-line-arguments.h | 1 + + completion/notmuch-completion.bash | 8 +- + completion/notmuch-completion.zsh | 4 +- + doc/man1/notmuch-search.rst | 65 ++++++- + notmuch-search.c | 385 +++++++++++++++++++++++++++++-------- + test/T090-search-output.sh | 137 +++++++++++++ + test/T095-search-filter-by.sh | 64 ++++++ + test/T410-argument-parsing.sh | 3 +- + test/arg-test.c | 9 + + 10 files changed, 600 insertions(+), 82 deletions(-) + create mode 100755 test/T095-search-filter-by.sh + +-- +2.1.1 + -- 2.26.2