From: Michal Sojka <sojkam1@fel.cvut.cz>
To: notmuch@notmuchmail.org
Subject: [PATCH 0/5] notmuch search --output=addresses
Date: Mon, 22 Sep 2014 11:37:54 +0200 [thread overview]
Message-ID: <1411378679-7307-1-git-send-email-sojkam1@fel.cvut.cz> (raw)
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
next reply other threads:[~2014-09-22 9:39 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 9:37 Michal Sojka [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411378679-7307-1-git-send-email-sojkam1@fel.cvut.cz \
--to=sojkam1@fel.cvut.cz \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).