[PATCH v5 0/7] notmuch search --output=sender/recipients

Subject: [PATCH v5 0/7] notmuch search --output=sender/recipients

Date: Fri, 31 Oct 2014 00:59:26 +0100

To: notmuch@notmuchmail.org

Cc:

From: Michal Sojka


Hi all,

this is v5 of the search --output=address series. It obsoletes v4
(id:1414421455-3037-1-git-send-email-sojkam1@fel.cvut.cz).

I addresses comments from Mark and Tomi. Based on the comments to v4
and earlier versions, patches 1-4 should be ready for merging. Patch 5
is a non-controversial part of the controversial --filter-by patch and
could be probably merged after review.

Patch 6 needs at least a review and patch 7 needs more discussion.

Changes from v4:

- patch changed to commit in commit messages
- opt->format changed to format
- Added comments to process_* functions
- duplicite changed to duplicate
- check_duplicate changed to is_duplicate
- Deduplication was split into two commits: basic deduplication
  without a command line option and configurable deduplication with
  --fiter-by.

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 (6):
  cli: search: Refactor passing of command line options
  cli: search: Convert --output to keyword-flag argument
  cli: search: Add --output={sender,recipients}
  cli: search: Do not output duplicate addresses
  cli: search: Add --output=count
  cli: search: Add --filter-by option to configure address filtering

 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        |  66 ++++++-
 notmuch-search.c                   | 388 +++++++++++++++++++++++++++++--------
 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, 604 insertions(+), 82 deletions(-)
 create mode 100755 test/T095-search-filter-by.sh

-- 
2.1.1


Thread: