From: Michal Sojka Date: Sun, 2 Nov 2014 00:49:50 +0000 (+0100) Subject: [PATCH 00/10] "notmuch address" command X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1bfbf38926f050f8525338c97050d76a9160642e;p=notmuch-archives.git [PATCH 00/10] "notmuch address" command --- diff --git a/6b/8677bc5de6970f5db4fc896dd4aab8770421d5 b/6b/8677bc5de6970f5db4fc896dd4aab8770421d5 new file mode 100644 index 000000000..565c2cfd4 --- /dev/null +++ b/6b/8677bc5de6970f5db4fc896dd4aab8770421d5 @@ -0,0 +1,113 @@ +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 695D4429E26 + for ; Sat, 1 Nov 2014 17:50:46 -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 exlFZARe7bp7 for ; + Sat, 1 Nov 2014 17:50:40 -0700 (PDT) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id 9B90A429E27 + for ; Sat, 1 Nov 2014 17:50:17 -0700 (PDT) +Received: from localhost (unknown [192.168.200.7]) + by max.feld.cvut.cz (Postfix) with ESMTP id 391075CD295 + for ; Sun, 2 Nov 2014 01:50:10 +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 6mfCejYuV66R for ; + Sun, 2 Nov 2014 01:50:06 +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 7F34F5CD28D + for ; Sun, 2 Nov 2014 01:50:06 +0100 (CET) +Received: from wsh by steelpick.2x.cz with local (Exim 4.84) + (envelope-from ) + id 1XkjMq-00084k-CY; Sun, 02 Nov 2014 01:50:04 +0100 +From: Michal Sojka +To: notmuch@notmuchmail.org +Subject: [PATCH 00/10] "notmuch address" command +Date: Sun, 2 Nov 2014 01:49:50 +0100 +Message-Id: <1414889400-30977-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: Sun, 02 Nov 2014 00:50:46 -0000 + +Hi all, + +this patch series is continuation of address output patches [1] and +applies on current master. It is based on Jani's idea to have new +command "notmuch address", but share the implementation with search +[2]. + +I tried to do it in a bit more cleaner way than Jani's RFC. In +particular I wanted each command to process command line independently +and only share search functions. + +Don't be scared by the number of patches. Most of them are trivial +refactoring. Patches 1-4 refactor the code so that it is easier to +split. Patch 5 is Jani's hierarchical command line parsing patch. +Patch 6 splits search functionality to new address command. Patch 7 is +minor refactoring. Patches 8-10 correspond to patches 5-7 in [1]. + +All patches pass the test suite. + +Regards, +-Michal + +[1] id:1414792441-29555-1-git-send-email-sojkam1@fel.cvut.cz +[2] id:cover.1414839970.git.jani@nikula.org + + +Jani Nikula (1): + cli: add support for hierarchical command line option arrays + +Michal Sojka (9): + cli: search: Rename options to context + cli: search: Move more variables into search_context_t + cli: search: Convert ctx. to ctx-> + cli: search: Split notmuch_search_command to smaller functions + cli: Introduce "notmuch address" command + cli: search: Convert --output to keyword argument + cli: address: Do not output duplicate addresses + cli: address: Add --output=count + cli: address: Add --filter-by option to configure address filtering + + command-line-arguments.c | 14 +- + command-line-arguments.h | 1 + + completion/notmuch-completion.bash | 48 +++- + completion/notmuch-completion.zsh | 11 +- + doc/man1/notmuch-address.rst | 140 ++++++++++++ + doc/man1/notmuch-search.rst | 21 +- + doc/man1/notmuch.rst | 7 +- + notmuch-client.h | 3 + + notmuch-search.c | 440 ++++++++++++++++++++++++++----------- + notmuch.c | 2 + + test/T095-address.sh | 148 +++++++++++++ + test/T097-address-filter-by.sh | 73 ++++++ + 12 files changed, 743 insertions(+), 165 deletions(-) + create mode 100644 doc/man1/notmuch-address.rst + create mode 100755 test/T095-address.sh + create mode 100755 test/T097-address-filter-by.sh + +-- +2.1.1 +