[PATCH] cli: add --output=address-{from, to, all} to notmuch search

2014-09-20 Thread Michal Sojka
On Fri, Sep 19 2014, David Bremner wrote: > Jani Nikula writes: > >> +if (name && *name) >> +full_address = talloc_asprintf (NULL, "%s <%s>", name, addr); >> +else >> +full_address = talloc_asprintf (NULL, "<%s>", addr > > Is there some reason not to use

Re: [PATCH] cli: add --output=address-{from, to, all} to notmuch search

2014-09-20 Thread Michal Sojka
On Fri, Sep 19 2014, David Bremner wrote: Jani Nikula j...@nikula.org writes: +if (name *name) +full_address = talloc_asprintf (NULL, %s %s, name, addr); +else +full_address = talloc_asprintf (NULL, %s, addr Is there some reason not to use sprinter

[PATCH] cli: add --output=address-{from,to,all} to notmuch search

2014-09-19 Thread David Bremner
Jani Nikula writes: > + if (name && *name) > + full_address = talloc_asprintf (NULL, "%s <%s>", name, addr); > + else > + full_address = talloc_asprintf (NULL, "<%s>", addr Is there some reason not to use sprinter as a talloc context here? > + > +

Re: [PATCH] cli: add --output=address-{from,to,all} to notmuch search

2014-09-19 Thread David Bremner
Jani Nikula j...@nikula.org writes: + if (name *name) + full_address = talloc_asprintf (NULL, %s %s, name, addr); + else + full_address = talloc_asprintf (NULL, %s, addr Is there some reason not to use sprinter as a talloc context here? + +

[PATCH] cli: add --output=address-{from,to,all} to notmuch search

2014-09-06 Thread Jani Nikula
address-from prints reply-to or from, address-to prints to, cc, and bcc, and address-all prints all of them. --- notmuch-search.c | 109 ++- 1 file changed, 100 insertions(+), 9 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c

[PATCH] cli: add --output=address-{from, to, all} to notmuch search

2014-09-06 Thread Mark Walters
On Sat, 06 Sep 2014, Jani Nikula wrote: > address-from prints reply-to or from, address-to prints to, cc, and > bcc, and address-all prints all of them. This looks good to me. Obviously needs the new commit message. I think we should think about the deduplication possibilities but that can

[PATCH] cli: add --output=address-{from,to,all} to notmuch search

2014-09-06 Thread Jani Nikula
address-from prints reply-to or from, address-to prints to, cc, and bcc, and address-all prints all of them. --- Mark, David - I wrote most of this almost two years ago, but wasn't really happy with it. There's address deduplication, but for large result sets that might use lots of memory.

[PATCH] cli: add --output=address-{from,to,all} to notmuch search

2014-09-06 Thread Jani Nikula
address-from prints reply-to or from, address-to prints to, cc, and bcc, and address-all prints all of them. --- Mark, David - I wrote most of this almost two years ago, but wasn't really happy with it. There's address deduplication, but for large result sets that might use lots of memory.

[PATCH] cli: add --output=address-{from,to,all} to notmuch search

2014-09-06 Thread Jani Nikula
address-from prints reply-to or from, address-to prints to, cc, and bcc, and address-all prints all of them. --- notmuch-search.c | 109 ++- 1 file changed, 100 insertions(+), 9 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c

Re: [PATCH] cli: add --output=address-{from, to, all} to notmuch search

2014-09-06 Thread Jani Nikula
On Sat, 06 Sep 2014, Jani Nikula j...@nikula.org wrote: address-from prints reply-to or from, address-to prints to, cc, and bcc, and address-all prints all of them. *sigh* this was supposed to be: --- cli: add --output=sender and --output=recipients to notmuch search sender prints from,

Re: [PATCH] cli: add --output=address-{from, to, all} to notmuch search

2014-09-06 Thread Mark Walters
On Sat, 06 Sep 2014, Jani Nikula j...@nikula.org wrote: address-from prints reply-to or from, address-to prints to, cc, and bcc, and address-all prints all of them. This looks good to me. Obviously needs the new commit message. I think we should think about the deduplication possibilities