unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/5] notmuch search --output=addresses
@ 2014-09-22  9:37 Michal Sojka
  2014-09-22  9:37 ` [PATCH 1/5] cli: Refactor option passing in the search command Michal Sojka
                   ` (4 more replies)
  0 siblings, 5 replies; 31+ messages in thread
From: Michal Sojka @ 2014-09-22  9:37 UTC (permalink / raw)
  To: notmuch

Hello all,

this patch series adds support for --output=addresses and similar
arguments in notmuch search. It is a reworked and extended version of
id:1410021689-15901-1-git-send-email-jani@nikula.org.

Compared to Jani's patches, I do not use keyword-flag command line
parser for the --output option, because this would not be useful for
most but one combination of keywords. Instead, this one combination is
explicitely mentioned as another keyword.

The flag command-line parser is introduced later, with (IMHO) better
syntax: --flags=one,two,... This feature is used to control address
deduplication via the --unique option.

Other extensions are added documentation, tests and shell completions.

The whole test suite passes with these patches.

The functionality presented here will be useful for improving Emacs
address completion (id:1411150602-21892-1-git-send-email-sojkam1@fel.cvut.cz).

Another nice use case is sending patched with git:

  git send-email --cc-cmd='nmsenders id:xxxx' ...

where nmsenders script contains:

  notmuch search --output=sender $(notmuch search --output=threads $1)



Michal Sojka (5):
  cli: Refactor option passing in the search command
  cli: Extend the search command for --output=addresses and similar
  cli: Add support for parsing command line "flag" options
  cli: Add configurable address deduplication for --output=addresses
  cli: Add tests for 'search --output=addresses' and similar

 command-line-arguments.c           |  40 +++++
 command-line-arguments.h           |   1 +
 completion/notmuch-completion.bash |   8 +-
 completion/notmuch-completion.zsh  |   4 +-
 doc/man1/notmuch-search.rst        |  55 ++++++-
 notmuch-search.c                   | 311 +++++++++++++++++++++++++++++--------
 test/Makefile.local                |   2 +-
 test/T090-search-output.sh         |  59 +++++++
 test/T095-search-unique.sh         |  63 ++++++++
 test/T410-argument-parsing.sh      |   3 +-
 test/arg-test.c                    |   8 +
 11 files changed, 482 insertions(+), 72 deletions(-)
 create mode 100755 test/T095-search-unique.sh

-- 
2.1.0

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2014-10-24 10:57 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22  9:37 [PATCH 0/5] notmuch search --output=addresses Michal Sojka
2014-09-22  9:37 ` [PATCH 1/5] cli: Refactor option passing in the search command Michal Sojka
2014-09-25 19:13   ` Tomi Ollila
2014-09-25 20:48     ` Michal Sojka
2014-09-29 16:04       ` Tomi Ollila
2014-09-29 17:28       ` Jani Nikula
2014-10-05 20:51         ` [PATCH v2 0/4] notmuch search --output=addresses Michal Sojka
2014-10-05 20:51           ` [PATCH v2 1/4] cli: Refactor option passing in the search command Michal Sojka
2014-10-05 20:51           ` [PATCH v2 2/4] cli: Extend the search command for --output=addresses and similar Michal Sojka
2014-10-06 18:56             ` Tomi Ollila
2014-10-09 10:55               ` Michal Sojka
2014-10-12 21:41                 ` [PATCH v3 0/4] notmuch search --output=sender/recipients Michal Sojka
2014-10-12 21:41                   ` [PATCH v3 1/4] cli: Refactor option passing in the search command Michal Sojka
2014-10-22 10:44                     ` Mark Walters
2014-10-12 21:41                   ` [PATCH v3 2/4] cli: Add support for parsing multiple keyword arguments Michal Sojka
2014-10-12 21:41                   ` [PATCH v3 3/4] cli: Extend the search command for --output={sender, recipients} Michal Sojka
2014-10-13 19:00                     ` Tomi Ollila
2014-10-13 21:38                       ` Michal Sojka
2014-10-19 10:02                         ` Tomi Ollila
2014-10-22 10:51                     ` Mark Walters
2014-10-24 10:57                       ` Michal Sojka
2014-10-23  9:41                     ` Mark Walters
2014-10-24  9:38                       ` Tomi Ollila
2014-10-24 10:23                       ` David Edmondson
2014-10-12 21:41                   ` [PATCH v3 4/4] cli: Add an option to filter our duplicate addresses Michal Sojka
2014-10-05 20:51           ` [PATCH v2 3/4] cli: Add support for parsing multiple keyword arguments Michal Sojka
2014-10-05 20:51           ` [PATCH v2 4/4] cli: Add configurable address deduplication for --output=addresses Michal Sojka
2014-09-22  9:37 ` [PATCH 2/5] cli: Extend the search command for --output=addresses and similar Michal Sojka
2014-09-22  9:37 ` [PATCH 3/5] cli: Add support for parsing command line "flag" options Michal Sojka
2014-09-22  9:37 ` [PATCH 4/5] cli: Add configurable address deduplication for --output=addresses Michal Sojka
2014-09-22  9:37 ` [PATCH 5/5] cli: Add tests for 'search --output=addresses' and similar Michal Sojka

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).