Re: [PATCH] lib: return "" rather than NULL from notmuch_thread_get_authors

2017-12-21 Thread David Bremner
Tomi Ollila writes: > On Thu, Dec 14 2017, David Bremner wrote: > >> The current beheviour is at best underdocumented. The modified test in > > Typo in commit message ;), otherwise looks reasonable to me > spill chucked and pished, d

Re: [PATCH] lib: return "" rather than NULL from notmuch_thread_get_authors

2017-12-20 Thread Tomi Ollila
On Thu, Dec 14 2017, David Bremner wrote: > The current beheviour is at best underdocumented. The modified test in Typo in commit message ;), otherwise looks reasonable to me > T470-missing-headers.sh previously relied on printf doing the right > thing with NULL, which seems ick. > > The use of

Re: [PATCH] lib: return "" rather than NULL from notmuch_thread_get_authors

2017-12-15 Thread Róman Joost
Dear David, On Thu, Dec 14, 2017 at 10:29:57PM -0400, David Bremner wrote: > The current beheviour is at best underdocumented. The modified test in > T470-missing-headers.sh previously relied on printf doing the right > thing with NULL, which seems ick. > > The use of talloc_strdup here is

[PATCH] lib: return "" rather than NULL from notmuch_thread_get_authors

2017-12-14 Thread David Bremner
The current beheviour is at best underdocumented. The modified test in T470-missing-headers.sh previously relied on printf doing the right thing with NULL, which seems ick. The use of talloc_strdup here is probably overkill, but it avoids having to enforce that thread->authors is never mutated

Re: Possible bug in notmuch_thread_get_authors ?

2017-11-28 Thread David Bremner
Róman Joost writes: > Checking other bindings it seems there is an explicit check for NULL and > we're wondering if that is really necessary. Perhaps a patch could > initialize `*authors` in the _resolve_thread_authors_string function to an > empty string OR at least mention

Possible bug in notmuch_thread_get_authors ?

2017-11-27 Thread Róman Joost
Hi, we're currently working on Haskell bindings for notmuch[1] and stumbled over an oddity in relation to the function notmuch_thread_get_authors in that it can be NULL. Checking other bindings it seems there is an explicit check for NULL and we're wondering if that is really necessary. Perhaps

notmuch_thread_get_authors

2015-04-22 Thread David Bremner
Austin Clements writes: > You're completely right that there's no way to reliably parse the > authors list returned by notmuch_thread_get_authors. So don't do > that. Just use notmuch_thread_get_messages, walk the messages list, and > build your own authors list. There's no need

notmuch_thread_get_authors

2015-04-22 Thread Ronny Chevalier
his >> in the CLI is just an hack, and it does not fix the issue for the >> library users. > > My suggestion was in no way specific to the CLI. That was the context of > the discussion at the time, but for the purposes of this discussion, the > CLI is just another library user. Ok,

notmuch_thread_get_authors

2015-04-21 Thread Austin Clements
in no way specific to the CLI. That was the context of > > the discussion at the time, but for the purposes of this discussion, the > > CLI is just another library user. > > Ok, sorry for misunderstanding. > > > > > You're completely right that there's no w

notmuch_thread_get_authors

2015-04-21 Thread Austin Clements
I. That was the context of the discussion at the time, but for the purposes of this discussion, the CLI is just another library user. You're completely right that there's no way to reliably parse the authors list returned by notmuch_thread_get_authors. So don't do that. Just use notmuch_thread_get_m

notmuch_thread_get_authors

2015-04-21 Thread Ronny Chevalier
On Tue, Apr 21, 2015 at 1:35 AM, David Bremner wrote: > Ronny Chevalier writes: > >> Hi, >> >> I would like to know the reason behind the way we get authors from a >> thread, with notmuch_thread_get_authors. >> > > there is some related patches

notmuch_thread_get_authors

2015-04-21 Thread David Bremner
Ronny Chevalier writes: > Hi, > > I would like to know the reason behind the way we get authors from a > thread, with notmuch_thread_get_authors. > there is some related patches/discussion at http://thread.gmane.org/gmane.mail.notmuch.general/19422 d

Re: notmuch_thread_get_authors

2015-04-21 Thread Ronny Chevalier
On Tue, Apr 21, 2015 at 1:35 AM, David Bremner da...@tethera.net wrote: Ronny Chevalier chevalier.ro...@gmail.com writes: Hi, I would like to know the reason behind the way we get authors from a thread, with notmuch_thread_get_authors. there is some related patches/discussion at http

Re: notmuch_thread_get_authors

2015-04-21 Thread Austin Clements
that there's no way to reliably parse the authors list returned by notmuch_thread_get_authors. So don't do that. Just use notmuch_thread_get_messages, walk the messages list, and build your own authors list. There's no need to introduce additional complexity and surface area into the library API

Re: notmuch_thread_get_authors

2015-04-21 Thread David Bremner
Austin Clements acleme...@csail.mit.edu writes: You're completely right that there's no way to reliably parse the authors list returned by notmuch_thread_get_authors. So don't do that. Just use notmuch_thread_get_messages, walk the messages list, and build your own authors list. There's

Re: notmuch_thread_get_authors

2015-04-21 Thread Austin Clements
, but for the purposes of this discussion, the CLI is just another library user. You're completely right that there's no way to reliably parse the authors list returned by notmuch_thread_get_authors. So don't do that. Just use notmuch_thread_get_messages, walk the messages list, and build your own

Re: notmuch_thread_get_authors

2015-04-21 Thread Ronny Chevalier
by notmuch_thread_get_authors. So don't do that. Just use notmuch_thread_get_messages, walk the messages list, and build your own authors list. There's no need to introduce additional complexity and surface area into the library API for this specific use case (IMO, even notmuch_thread_get_authors shouldn't

notmuch_thread_get_authors

2015-04-20 Thread Ronny Chevalier
Hi, I would like to know the reason behind the way we get authors from a thread, with notmuch_thread_get_authors. Getting a string formatted as it is right now make it impossible to parse properly the authors. If there is an author with | or , in its name (or email address if there is no name

Re: notmuch_thread_get_authors

2015-04-20 Thread David Bremner
Ronny Chevalier chevalier.ro...@gmail.com writes: Hi, I would like to know the reason behind the way we get authors from a thread, with notmuch_thread_get_authors. there is some related patches/discussion at http://thread.gmane.org/gmane.mail.notmuch.general/19422 d

notmuch_thread_get_authors

2015-04-20 Thread Ronny Chevalier
Hi, I would like to know the reason behind the way we get authors from a thread, with notmuch_thread_get_authors. Getting a string formatted as it is right now make it impossible to parse properly the authors. If there is an author with | or , in its name (or email address if there is no name

[PATCH] notmuch_thread_get_authors: document match grouping with |

2014-09-13 Thread David Bremner
Gaute Hope writes: > as stated in thread.cc:115 > > /* Construct an authors string from matched_authors_array and > * authors_array. The string contains matched authors first, then > * non-matched authors (with the two groups separated by '|'). Within > * each group, authors are listed in

Re: [PATCH] notmuch_thread_get_authors: document match grouping with |

2014-09-13 Thread David Bremner
Gaute Hope e...@gaute.vetsj.com writes: as stated in thread.cc:115 /* Construct an authors string from matched_authors_array and * authors_array. The string contains matched authors first, then * non-matched authors (with the two groups separated by '|'). Within * each group, authors are

[PATCH] notmuch_thread_get_authors: document match grouping with |

2014-09-10 Thread Gaute Hope
as stated in thread.cc:115 /* Construct an authors string from matched_authors_array and * authors_array. The string contains matched authors first, then * non-matched authors (with the two groups separated by '|'). Within * each group, authors are listed in date order. */ this is, however,

[PATCH] notmuch_thread_get_authors: document match grouping with |

2014-09-10 Thread Gaute Hope
as stated in thread.cc:115 /* Construct an authors string from matched_authors_array and * authors_array. The string contains matched authors first, then * non-matched authors (with the two groups separated by '|'). Within * each group, authors are listed in date order. */ this is, however,