On Tue, Nov 04 2014, Mark Walters wrote:
> On Mon, 03 Nov 2014, Michal Sojka wrote:
>> This moves address-related functionality from search command to the
>> new address command. The implementation shares almost all code and
>> some command line options.
>>
>> Options --offset and --limit were int
Michal Sojka writes:
>> Similarly for excludes. I'm ok with the duplication for now, and I can
>> see an argument for not making the user chase references.
>
> What about using RST include directive [1] to include shared parts into
> more documents?
>
> [1]
> http://docutils.sourceforge.net/doc
On Tue, Nov 04 2014, David Bremner wrote:
> Michal Sojka writes:
>
>> +{
>> +local cur prev words cword split
>> +_init_completion -s || return
>> +
>> +$split &&
>> +case "${prev}" in
>> +--format)
>> +COMPREPLY=( $( compgen -W "json sexp text text0" -- "${cur}" ) )
>>
On Tue, Nov 04 2014, Michal Sojka wrote:
> Hi all,
>
> this is v2 of "notmuch address" patchset. It obsoletes [1].
>
> Don't be scared by the number of patches. Most of them are trivial
> refactoring. Patches 1-4 refactor the code so that "notmuch search"
> command is easier to split. Patch 5 is
This moves address-related functionality from search command to the
new address command. The implementation shares almost all code and
some command line options.
Options --offset and --limit were intentionally not included in the
address command, because they refer to messages numbers, which users
In the next commit the options structure will be extended by
non-option variables. Therefore we need a more generic name.
Just text replacement, no other changes.
---
notmuch-search.c | 142 +++
1 file changed, 71 insertions(+), 71 deletions(-)
This filters out duplicate addresses from address command output.
It also also adds tests for the address command.
The code here is an extended version of a patch from Jani Nikula.
---
doc/man1/notmuch-address.rst | 2 +-
notmuch-search.c | 42 ++-
test/T095-address.
This output prints how many times was each address encountered during
search.
---
completion/notmuch-completion.bash | 2 +-
completion/notmuch-completion.zsh | 2 +-
doc/man1/notmuch-address.rst | 11 -
notmuch-search.c | 49 -
In a subsequent commit, these functions will be used to share some
functionality between search and address commands.
---
notmuch-search.c | 155 ++-
1 file changed, 86 insertions(+), 69 deletions(-)
diff --git a/notmuch-search.c b/notmuch-searc
In order to share some command line options between search and address
subcommands we need to add corresponding variables to the context
structure. While we are at it, we also add notmuch_database_t to unify
parameters of all do_search_* functions and to simplify subsequent
commits.
Otherwise, the
From: Jani Nikula
NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in
output_var.
The "Unrecognized option" message was moved out of parse_option() to
not be emitted twice or when parsing a non-inherited option.
---
command-line-arguments.c | 16 +---
command-line-argument
This option allows to configure the criterion for duplicate address
filtering. Without this option, all unique combinations of name and
address parts are printed. This option allows to filter the output
more, for example to only contain unique address parts.
---
completion/notmuch-completion.bash
Hi all,
this is v3 of "notmuch address" patchset. It obsoletes [1].
I think I addressed all comments made to v2. The diff between v2 and
v3 is below. Besides this, I improved commit messages.
I also tried to get rid of global variables in 6/10, but it looked
ugly, because the definition of keywo
Now, when address related outputs are in a separate command, it makes
no sense to combine multiple --output options in search command line.
Using switch statement to handle different outputs is more readable
than a series of if statements.
---
doc/man1/notmuch-search.rst | 3 ---
notmuch-search.c
In the next commit, notmuch_search_command will be refactored to
several smaller functions. In order to simplify the next commit to
verbatim move of several lines to new functions with search_context_t*
argument, we convert all references to this structure to pointer
dereferences. To do so we renam
On Tue, Nov 04 2014, Mark Walters wrote:
> On Mon, 03 Nov 2014, Michal Sojka wrote:
>> This moves address-related functionality from search command to the
>> new address command. The implementation shares almost all code and
>> some command line options.
>>
>> Options --offset and --limit were int
Michal Sojka writes:
>> Similarly for excludes. I'm ok with the duplication for now, and I can
>> see an argument for not making the user chase references.
>
> What about using RST include directive [1] to include shared parts into
> more documents?
>
> [1]
> http://docutils.sourceforge.net/doc
On Tue, Nov 04 2014, David Bremner wrote:
> Michal Sojka writes:
>
>> +{
>> +local cur prev words cword split
>> +_init_completion -s || return
>> +
>> +$split &&
>> +case "${prev}" in
>> +--format)
>> +COMPREPLY=( $( compgen -W "json sexp text text0" -- "${cur}" ) )
>>
On Tue, Nov 04 2014, David Bremner wrote:
> Michal Sojka writes:
>
>>
>> +/* Returns TRUE iff name and addr is duplicate. */
>
> If you're revising this patch, it would be good to mention the side
> effect of this function.
>
>> -process_address_list (const search_context_t *ctx, InternetAddress
On Tue, Nov 04 2014, David Bremner wrote:
> Michal Sojka writes:
>
>>
>> +/* Returns TRUE iff name and addr is duplicate. */
>
> If you're revising this patch, it would be good to mention the side
> effect of this function.
>
>> -process_address_list (const search_context_t *ctx, InternetAddress
On Tue, Nov 04 2014, Michal Sojka wrote:
> Hi all,
>
> this is v2 of "notmuch address" patchset. It obsoletes [1].
>
> Don't be scared by the number of patches. Most of them are trivial
> refactoring. Patches 1-4 refactor the code so that "notmuch search"
> command is easier to split. Patch 5 is
On Tue, Nov 04 2014, Mark Walters wrote:
> Hi
>
> On Mon, 03 Nov 2014, Michal Sojka wrote:
>> Now, when address related outputs are in a separate command, it makes
>> no sense to combine multiple --output options in search command line.
>> Using switch statement to handle different outputs is more
On Tue, Nov 04 2014, David Bremner wrote:
> Michal Sojka writes:
>
>> +{
>> +local cur prev words cword split
>> +_init_completion -s || return
>> +
>> +$split &&
>> +case "${prev}" in
>> +--format)
>> +COMPREPLY=( $( compgen -W "json sexp text text0" -- "${cur}" ) )
On Tue, Nov 04 2014, Mark Walters wrote:
> Hi
>
> On Mon, 03 Nov 2014, Michal Sojka wrote:
>> Now, when address related outputs are in a separate command, it makes
>> no sense to combine multiple --output options in search command line.
>> Using switch statement to handle different outputs is more
On Tue, Nov 04 2014, David Bremner wrote:
> Michal Sojka writes:
>
>> +{
>> +local cur prev words cword split
>> +_init_completion -s || return
>> +
>> +$split &&
>> +case "${prev}" in
>> +--format)
>> +COMPREPLY=( $( compgen -W "json sexp text text0" -- "${cur}" ) )
On Mon, 03 Nov 2014, Michal Sojka wrote:
> Hi all,
>
> this is v2 of "notmuch address" patchset. It obsoletes [1].
>
> Don't be scared by the number of patches. Most of them are trivial
> refactoring. Patches 1-4 refactor the code so that "notmuch search"
> command is easier to split. Patch 5 is
On Sat, 01 Nov 2014, Jani Nikula wrote:
> On Sat, 01 Nov 2014, Michal Sojka wrote:
>> On Sat, Nov 01 2014, Jani Nikula wrote:
>>> On Fri, 31 Oct 2014, Michal Sojka wrote:
This option allows to configure the criterion for duplicate address
filtering. Without this option, all unique com
On Mon, 03 Nov 2014, Michal Sojka wrote:
> This output prints how many times was each address encountered during
> search.
> ---
> completion/notmuch-completion.bash | 2 +-
> completion/notmuch-completion.zsh | 2 +-
> doc/man1/notmuch-address.rst | 7 ++
> notmuch-search.c
> Hi
>
> On Mon, 03 Nov 2014, Michal Sojka wrote:
>> Now, when address related outputs are in a separate command, it makes
>> no sense to combine multiple --output options in search command line.
>> Using switch statement to handle different outputs is more readable
>> than a series of if stateme
On Mon, 03 Nov 2014, Michal Sojka wrote:
> This moves address-related functionality from search command to the
> new address command. The implementation shares almost all code and
> some command line options.
>
> Options --offset and --limit were intentionally not included in the
> address command
Hi
On Mon, 03 Nov 2014, Michal Sojka wrote:
> Now, when address related outputs are in a separate command, it makes
> no sense to combine multiple --output options in search command line.
> Using switch statement to handle different outputs is more readable
> than a series of if statements.
I a
Michal Sojka writes:
>
> +/* Returns TRUE iff name and addr is duplicate. */
If you're revising this patch, it would be good to mention the side
effect of this function.
> -process_address_list (const search_context_t *ctx, InternetAddressList *list)
> +process_address_list (const search_cont
Michal Sojka writes:
> +{
> +local cur prev words cword split
> +_init_completion -s || return
> +
> +$split &&
> +case "${prev}" in
> + --format)
> + COMPREPLY=( $( compgen -W "json sexp text text0" -- "${cur}" ) )
> + return
> + ;;
> + --output)
>
David Bremner writes:
> Michal Sojka writes:
>
>> From: Jani Nikula
>>
>> NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in
>> output_var.
>
> At the risk of bikeshedding, what about NOTMUCH_OPT_RECURSE instead of
> _INHERIT?
Hrm. Now that I read the next patch, I retract my sugges
Michal Sojka writes:
> From: Jani Nikula
>
> NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in
> output_var.
At the risk of bikeshedding, what about NOTMUCH_OPT_RECURSE instead of
_INHERIT?
Michal Sojka writes:
> Mostly text replacement.
Here I'd like to know why we are moving from a struct to a pointer to
struct.
It would be a bonus to hightlight any non text-replacement.
Michal Sojka writes:
> Just text replacement, no other changes.
I agree that the actual change is trivial, but the commit message
could/should hint why it is being done.
On Mon, 03 Nov 2014, Michal Sojka wrote:
> Hi all,
>
> this is v2 of "notmuch address" patchset. It obsoletes [1].
>
> Don't be scared by the number of patches. Most of them are trivial
> refactoring. Patches 1-4 refactor the code so that "notmuch search"
> command is easier to split. Patch 5 is
On Sat, 01 Nov 2014, Jani Nikula wrote:
> On Sat, 01 Nov 2014, Michal Sojka wrote:
>> On Sat, Nov 01 2014, Jani Nikula wrote:
>>> On Fri, 31 Oct 2014, Michal Sojka wrote:
This option allows to configure the criterion for duplicate address
filtering. Without this option, all unique com
On Mon, 03 Nov 2014, Michal Sojka wrote:
> This output prints how many times was each address encountered during
> search.
> ---
> completion/notmuch-completion.bash | 2 +-
> completion/notmuch-completion.zsh | 2 +-
> doc/man1/notmuch-address.rst | 7 ++
> notmuch-search.c
> Hi
>
> On Mon, 03 Nov 2014, Michal Sojka wrote:
>> Now, when address related outputs are in a separate command, it makes
>> no sense to combine multiple --output options in search command line.
>> Using switch statement to handle different outputs is more readable
>> than a series of if stateme
On Mon, 03 Nov 2014, Michal Sojka wrote:
> This moves address-related functionality from search command to the
> new address command. The implementation shares almost all code and
> some command line options.
>
> Options --offset and --limit were intentionally not included in the
> address command
Hi
On Mon, 03 Nov 2014, Michal Sojka wrote:
> Now, when address related outputs are in a separate command, it makes
> no sense to combine multiple --output options in search command line.
> Using switch statement to handle different outputs is more readable
> than a series of if statements.
I a
This option allows to configure the criterion for duplicate address
filtering. Without this option, all unique combinations of name and
address parts are printed. This option allows to filter the output
more, for example to only contain unique address parts.
---
completion/notmuch-completion.bash
This output prints how many times was each address encountered during
search.
---
completion/notmuch-completion.bash | 2 +-
completion/notmuch-completion.zsh | 2 +-
doc/man1/notmuch-address.rst | 7 ++
notmuch-search.c | 49 --
This filters out duplicate addresses from address command output.
It also also adds tests for the address command.
The code here is an extended version of a patch from Jani Nikula.
---
doc/man1/notmuch-address.rst | 2 +-
notmuch-search.c | 40 -
test/T095-address.
Now, when address related outputs are in a separate command, it makes
no sense to combine multiple --output options in search command line.
Using switch statement to handle different outputs is more readable
than a series of if statements.
---
doc/man1/notmuch-search.rst | 3 ---
notmuch-search.c
This moves address-related functionality from search command to the
new address command. The implementation shares almost all code and
some command line options.
Options --offset and --limit were intentionally not included in the
address command, because they refer to messages numbers, which users
From: Jani Nikula
NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in
output_var.
The "Unrecognized option" message was moved out of parse_option() to
not be emitted twice or when parsing a non-inherited option.
---
command-line-arguments.c | 16 +---
command-line-argument
In the next commit, these functions will be used to share some
functionality between search and address commands.
---
notmuch-search.c | 155 ++-
1 file changed, 86 insertions(+), 69 deletions(-)
diff --git a/notmuch-search.c b/notmuch-search.c
Mostly text replacement.
---
notmuch-search.c | 81
1 file changed, 41 insertions(+), 40 deletions(-)
diff --git a/notmuch-search.c b/notmuch-search.c
index 3d2012b..6765a16 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -474,7 +47
Just refactoring, no functional changes.
---
notmuch-search.c | 49 ++---
1 file changed, 26 insertions(+), 23 deletions(-)
diff --git a/notmuch-search.c b/notmuch-search.c
index 2c47b80..3d2012b 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -
Just text replacement, no other changes.
---
notmuch-search.c | 142 +++
1 file changed, 71 insertions(+), 71 deletions(-)
diff --git a/notmuch-search.c b/notmuch-search.c
index 6345fb6..2c47b80 100644
--- a/notmuch-search.c
+++ b/notmuch-search
Hi all,
this is v2 of "notmuch address" patchset. It obsoletes [1].
Don't be scared by the number of patches. Most of them are trivial
refactoring. Patches 1-4 refactor the code so that "notmuch search"
command is easier to split. Patch 5 is Jani's hierarchical command
line parsing patch. Patch 6
54 matches
Mail list logo