Re: [PATCH 06/11] lib: Internal support for querying and creating ghost messages

2014-10-05 Thread David Bremner
Austin Clements writes: > > I'm used to reading this stuff, so either way is fine with me. Do we > have bit set / clear / read macros? > I guess not. the things we have in query.cc are related but different. >> > + else if (*i == "Tghost") >> > + message->flags |= (1 << NOTMUCH_MESSAGE_F

Re: [PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-05 Thread David Bremner
Austin Clements writes: > Quoth David Bremner on Oct 05 at 9:45 am: >> Austin Clements writes: >> > +void *local = talloc_new (NULL); >> >> What's the advantage of using a local talloc context here? Is this just >> an optimization? > > There are a few allocations that wind up going in to t

Re: [PATCH 08/11] lib: Implement upgrade to ghost messages feature

2014-10-05 Thread David Bremner
Austin Clements writes: > Quoth David Bremner on Oct 05 at 10:56 am: >> Austin Clements writes: >> > +if (new_features & NOTMUCH_FEATURE_GHOSTS) { >> > + t_end = db->metadata_keys_end ("thread_id_"); >> > + for (t = db->metadata_keys_begin ("thread_id_"); t != t_end; ++t) >> > + ++tot

[PATCH v2 4/4] cli: Add configurable address deduplication for --output=addresses

2014-10-05 Thread Michal Sojka
The code here is an extended version of a patch from Jani Nikula. --- completion/notmuch-completion.bash | 6 ++- completion/notmuch-completion.zsh | 3 +- doc/man1/notmuch-search.rst| 32 notmuch-search.c | 101 ++--- te

[PATCH v2 3/4] cli: Add support for parsing multiple keyword arguments

2014-10-05 Thread Michal Sojka
From: Jani Nikula This allows having multiple --foo=bar --foo=baz options on the command line, with the corresponding values OR'd together. [Test added by Michal Sojka] --- command-line-arguments.c | 6 +- command-line-arguments.h | 1 + test/T410-argument-parsing.sh | 3 ++- test

[PATCH v2 2/4] cli: Extend the search command for --output=addresses and similar

2014-10-05 Thread Michal Sojka
The new outputs allow printing senders, recipients or both of matching messages. This code based on a patch from Jani Nikula. --- completion/notmuch-completion.bash | 2 +- completion/notmuch-completion.zsh | 3 +- doc/man1/notmuch-search.rst| 22 +++- notmuch-search.c

[PATCH v2 1/4] cli: Refactor option passing in the search command

2014-10-05 Thread Michal Sojka
Many functions that implement the search command need to access command line options. Instead of passing each option in a separate variable, put them in a structure and pass only this structure. This will become handy in the following patches. --- notmuch-search.c | 122 ++

[PATCH v2 0/4] notmuch search --output=addresses

2014-10-05 Thread Michal Sojka
Hi, this is a second version of my adaptation of Jani's patch series adding --output=addresses and similar arguments to notmuch search. Based on the feedback from others, this version uses Jani's original "keyword flags" implementation with --flag=a --flab=b syntax. Also the tests for --output an

[PATCH 08/11] lib: Implement upgrade to ghost messages feature

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 10:56 am: > Austin Clements writes: > > +if (new_features & NOTMUCH_FEATURE_GHOSTS) { > > + t_end = db->metadata_keys_end ("thread_id_"); > > + for (t = db->metadata_keys_begin ("thread_id_"); t != t_end; ++t) > > + ++total; > > +} > > It would b

[PATCH 06/11] lib: Internal support for querying and creating ghost messages

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 10:30 am: > Austin Clements writes: > > > + message->flags &= ~(1 << NOTMUCH_MESSAGE_FLAG_GHOST); > > What do you think about using bit set / clear / read macros? I don't > insist, but I wonder if it would make this part more readable. I'm used to reading

[PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 9:45 am: > Austin Clements writes: > > +void *local = talloc_new (NULL); > > What's the advantage of using a local talloc context here? Is this just > an optimization? There are a few allocations that wind up going in to this local context because of the cal

Re: [PATCH 08/11] lib: Implement upgrade to ghost messages feature

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 10:56 am: > Austin Clements writes: > > +if (new_features & NOTMUCH_FEATURE_GHOSTS) { > > + t_end = db->metadata_keys_end ("thread_id_"); > > + for (t = db->metadata_keys_begin ("thread_id_"); t != t_end; ++t) > > + ++total; > > +} > > It would b

Re: [PATCH 06/11] lib: Internal support for querying and creating ghost messages

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 10:30 am: > Austin Clements writes: > > > + message->flags &= ~(1 << NOTMUCH_MESSAGE_FLAG_GHOST); > > What do you think about using bit set / clear / read macros? I don't > insist, but I wonder if it would make this part more readable. I'm used to reading

Re: [PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-05 Thread Austin Clements
Quoth David Bremner on Oct 05 at 9:45 am: > Austin Clements writes: > > +void *local = talloc_new (NULL); > > What's the advantage of using a local talloc context here? Is this just > an optimization? There are a few allocations that wind up going in to this local context because of the cal

[PATCH] Add default configuration values to the man page

2014-10-05 Thread Michal Sojka
On Wed, Oct 01 2014, Sergei Shilovsky wrote: > --- > doc/man1/notmuch-config.rst | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst > index 3c9a568..9de5534 100644 > --- a/doc/man1/notmuch-config.rst > +++ b/doc/ma

[PATCH v2 2/4] cli: Extend the search command for --output=addresses and similar

2014-10-05 Thread Michal Sojka
The new outputs allow printing senders, recipients or both of matching messages. This code based on a patch from Jani Nikula. --- completion/notmuch-completion.bash | 2 +- completion/notmuch-completion.zsh | 3 +- doc/man1/notmuch-search.rst| 22 +++- notmuch-search.c

[PATCH v2 1/4] cli: Refactor option passing in the search command

2014-10-05 Thread Michal Sojka
Many functions that implement the search command need to access command line options. Instead of passing each option in a separate variable, put them in a structure and pass only this structure. This will become handy in the following patches. --- notmuch-search.c | 122 ++

[PATCH v2 3/4] cli: Add support for parsing multiple keyword arguments

2014-10-05 Thread Michal Sojka
From: Jani Nikula This allows having multiple --foo=bar --foo=baz options on the command line, with the corresponding values OR'd together. [Test added by Michal Sojka] --- command-line-arguments.c | 6 +- command-line-arguments.h | 1 + test/T410-argument-parsing.sh | 3 ++- test

[PATCH v2 0/4] notmuch search --output=addresses

2014-10-05 Thread Michal Sojka
Hi, this is a second version of my adaptation of Jani's patch series adding --output=addresses and similar arguments to notmuch search. Based on the feedback from others, this version uses Jani's original "keyword flags" implementation with --flag=a --flab=b syntax. Also the tests for --output an

[PATCH v2 4/4] cli: Add configurable address deduplication for --output=addresses

2014-10-05 Thread Michal Sojka
The code here is an extended version of a patch from Jani Nikula. --- completion/notmuch-completion.bash | 6 ++- completion/notmuch-completion.zsh | 3 +- doc/man1/notmuch-search.rst| 32 notmuch-search.c | 101 ++--- te

[PATCH] NEWS: mention the change in default build flags

2014-10-05 Thread David Bremner
Tomi Ollila writes: > On Sun, Oct 05 2014, David Bremner wrote: > >> It blows things up by a factor of six or so, so it's worth giving >> people a heads up. It won't effect e.g. Debian, that already builds >> with -g and then strips. > > Maybe SomeOne(?) could make a patch that strip(1)s at make

[PATCH 00/11] Add ghost messages and fix thread linking

2014-10-05 Thread David Bremner
Austin Clements writes: > This series modifies our database representation of messages that have > been referenced by other messages, but for which we don't have the > message itself. Currently, we store this information as Xapian > metadata, but this has several downsides for performance and >

[PATCH 08/11] lib: Implement upgrade to ghost messages feature

2014-10-05 Thread David Bremner
Austin Clements writes: > +if (new_features & NOTMUCH_FEATURE_GHOSTS) { > + t_end = db->metadata_keys_end ("thread_id_"); > + for (t = db->metadata_keys_begin ("thread_id_"); t != t_end; ++t) > + ++total; > +} It would be nice to have the comment below, or something like i

[PATCH 06/11] lib: Internal support for querying and creating ghost messages

2014-10-05 Thread David Bremner
Austin Clements writes: > + message->flags &= ~(1 << NOTMUCH_MESSAGE_FLAG_GHOST); What do you think about using bit set / clear / read macros? I don't insist, but I wonder if it would make this part more readable. > + else if (*i == "Tghost") > + message->flags |= (1 << NOT

[PATCH] NEWS: mention the change in default build flags

2014-10-05 Thread Tomi Ollila
On Sun, Oct 05 2014, David Bremner wrote: > It blows things up by a factor of six or so, so it's worth giving > people a heads up. It won't effect e.g. Debian, that already builds > with -g and then strips. Maybe SomeOne(?) could make a patch that strip(1)s at make install time ? Tomi > --- >

[PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-05 Thread David Bremner
Austin Clements writes: > +void *local = talloc_new (NULL); What's the advantage of using a local talloc context here? Is this just an optimization? d

[PATCH] NEWS: Document "nmbug: Translate to Python"

2014-10-05 Thread W. Trevor King
This is mostly culled from the commit message for 7f2cb3be (nmbug: Translate to Python, 2014-10-03). I realized while writing it that the 7f2cb3be commit message has: * 'nmbug log' now execs 'git log', as there's no need to keep the Python process around once we've launched Git there. But

[PATCH] NEWS: Document "nmbug: Translate to Python"

2014-10-05 Thread W. Trevor King
This is mostly culled from the commit message for 7f2cb3be (nmbug: Translate to Python, 2014-10-03). I realized while writing it that the 7f2cb3be commit message has: * 'nmbug log' now execs 'git log', as there's no need to keep the Python process around once we've launched Git there. But

[PATCH] NEWS: mention the change in default build flags

2014-10-05 Thread David Bremner
It blows things up by a factor of six or so, so it's worth giving people a heads up. It won't effect e.g. Debian, that already builds with -g and then strips. --- NEWS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS b/NEWS index fa57e5d..eb769fd 100644 --- a/NEWS +++ b/NEWS @@ -42,

[PATCH] test: Port atomicity test to Python

2014-10-05 Thread David Bremner
Austin Clements writes: > Previously, this was implemented using a horrible GDB script (because > there is no such thing as a non-horrible GDB script). This GDB script > often broke with newer versions of GDB for mysterious reasons. Port > the test script to GDB's Python API, which makes the co

[PATCH 1/2] test: check for debug symbols in notmuch

2014-10-05 Thread David Bremner
Tomi Ollila writes: > On Fri, Oct 03 2014, David Bremner wrote: > >> In the future, tests may rely on debug symbols being present in >> notmuch, so we plan to switch the default flags. >> >> The main purpose of this test is to help explain the perhaps >> mysterious failures of other tests which

[PATCH] hex-escape: remove unused variable default_buf_size

2014-10-05 Thread David Bremner
Jani Nikula writes: > Found by clang: > pushed d

[PATCH v6 1/2] nmbug: Translate to Python

2014-10-05 Thread David Bremner
"W. Trevor King" writes: > This allows us to capture stdout and stderr separately, and do other > explicit subprocess manipulation without resorting to external > packages. It should be compatible with Python 2.7 and later > (including the 3.x series). > Pushed patch 1/2 to master. This probabl

Re: [PATCH] Add default configuration values to the man page

2014-10-05 Thread Michal Sojka
On Wed, Oct 01 2014, Sergei Shilovsky wrote: > --- > doc/man1/notmuch-config.rst | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst > index 3c9a568..9de5534 100644 > --- a/doc/man1/notmuch-config.rst > +++ b/doc/ma

Re: [PATCH] NEWS: mention the change in default build flags

2014-10-05 Thread David Bremner
Tomi Ollila writes: > On Sun, Oct 05 2014, David Bremner wrote: > >> It blows things up by a factor of six or so, so it's worth giving >> people a heads up. It won't effect e.g. Debian, that already builds >> with -g and then strips. > > Maybe SomeOne(™) could make a patch that strip(1)s at make

Re: [PATCH 00/11] Add ghost messages and fix thread linking

2014-10-05 Thread David Bremner
Austin Clements writes: > This series modifies our database representation of messages that have > been referenced by other messages, but for which we don't have the > message itself. Currently, we store this information as Xapian > metadata, but this has several downsides for performance and >

Re: [PATCH 08/11] lib: Implement upgrade to ghost messages feature

2014-10-05 Thread David Bremner
Austin Clements writes: > +if (new_features & NOTMUCH_FEATURE_GHOSTS) { > + t_end = db->metadata_keys_end ("thread_id_"); > + for (t = db->metadata_keys_begin ("thread_id_"); t != t_end; ++t) > + ++total; > +} It would be nice to have the comment below, or something like i

Re: [PATCH 06/11] lib: Internal support for querying and creating ghost messages

2014-10-05 Thread David Bremner
Austin Clements writes: > + message->flags &= ~(1 << NOTMUCH_MESSAGE_FLAG_GHOST); What do you think about using bit set / clear / read macros? I don't insist, but I wonder if it would make this part more readable. > + else if (*i == "Tghost") > + message->flags |= (1 << NOT

Re: [PATCH 02/11] lib: Refactor _notmuch_database_link_message

2014-10-05 Thread David Bremner
Austin Clements writes: > +void *local = talloc_new (NULL); What's the advantage of using a local talloc context here? Is this just an optimization? d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH] NEWS: mention the change in default build flags

2014-10-05 Thread Tomi Ollila
On Sun, Oct 05 2014, David Bremner wrote: > It blows things up by a factor of six or so, so it's worth giving > people a heads up. It won't effect e.g. Debian, that already builds > with -g and then strips. Maybe SomeOne(™) could make a patch that strip(1)s at make install time ? Tomi > --- >