[PATCH 4/8] lib: extend private string map API with iterators

2016-08-02 Thread David Bremner
Support for prefix based iterators is perhaps overengineering, but I wanted to mimic the existing database_config API. --- lib/notmuch-private.h | 21 ++- lib/string-map.c | 72 +++ 2 files changed, 92 insertions(+), 1 deletion(-)

[PATCH 7/8] CLI: add properties to dump output

2016-08-02 Thread David Bremner
Part of providing extensibility via properties is to make sure that user data is not lost. Thus we need to be able to dump and restore properties. --- doc/man1/notmuch-dump.rst | 18 ++--- notmuch-client.h | 3 ++ notmuch-dump.c| 85

[PATCH 8/8] cli: optionally restore message properties from dump file

2016-08-02 Thread David Bremner
This somewhat mimics the config line parsing, except there can be arbitrarily many key value pairs, so one more level of looping is required. --- doc/man1/notmuch-restore.rst | 13 +-- notmuch-restore.c | 85 +--

[PATCH 2/8] lib: private string map (associative array) API

2016-08-02 Thread David Bremner
The choice of array implementation is deliberate, for future iterator support --- lib/Makefile.local| 2 + lib/notmuch-private.h | 11 lib/string-map.c | 153 ++ 3 files changed, 166 insertions(+) create mode 100644

[PATCH 5/8] lib: iterator API for message properties

2016-08-02 Thread David Bremner
This is a thin wrapper around the string map iterator API just introduced. --- lib/message-property.cc | 38 +++ lib/notmuch.h | 95 + test/T610-message-property.sh | 107 ++ 3 files

[PATCH 1/8] lib: read "property" terms from messages.

2016-08-02 Thread David Bremner
This is a first step towards providing an API to attach arbitrary (key,value) pairs to messages and retrieve all of the values for a given key. --- lib/database.cc | 1 + lib/message.cc| 29 - lib/notmuch-private.h | 3 +++ 3 files changed, 32

[PATCH 6/8] CLI: refactor dumping of tags.

2016-08-02 Thread David Bremner
This is mainly code movement, to make room in the loop over messages for dumping properties. --- notmuch-dump.c | 127 +++-- 1 file changed, 69 insertions(+), 58 deletions(-) diff --git a/notmuch-dump.c b/notmuch-dump.c index cae1db8..d80ed8b8

[PATCH 3/8] lib: basic message-property API

2016-08-02 Thread David Bremner
Initially, support get, set and removal of single key/value pair, as well as removing all properties. --- lib/message-private.h | 16 +++ lib/message-property.cc | 108 ++ lib/message.cc| 52 +++-

v2 of message properties patches

2016-08-02 Thread David Bremner
This includes a bunch of whitespace cleanup (enough that the interdiff is a bit boring/noisy) and id:1468665174-11929-1-git-send-email-da...@tethera.net, as well as being rebased on master. Here is said boring interdiff diff --git a/lib/message-property.cc b/lib/message-property.cc index

Re: A systematic way of handling Xapian lock errors?

2016-08-02 Thread Matt Armstrong
David Bremner writes: > Matt Armstrong writes: > > >> To address both, has something like this ever been considered: >> >> notmuch --lock_timeout COMMAND ARG... >> >> Then frontends like Emacs could lean on retry logic written in C. If >> this seems

Re: notmuch and "mute" -- useful to anyone?

2016-08-02 Thread David Bremner
Matt Armstrong writes: > Is anyone else interested in Gmail-like "mute" support in notmuch.el? > If so, I can think about polishing the below off and adding it to > notmuch. > > I've managed to implement Gmail's "mute" in notmuch as follows in my > notmuch-post-new: > >

Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.

2016-08-02 Thread Nicolas Petton
Matt Armstrong writes: >> The only AUTHORS file I know about is etc/AUTHORS, which was last >> updated on the emacs-25 branch by commit d08afa1 one week ago. > > Are you thinking of emacs? This thread is about notmuch, not emacs. Oh! I did not even see that this wasn't

Re: A systematic way of handling Xapian lock errors?

2016-08-02 Thread David Bremner
Matt Armstrong writes: > To address both, has something like this ever been considered: > > notmuch --lock_timeout COMMAND ARG... > > Then frontends like Emacs could lean on retry logic written in C. If > this seems workable, it is something I can try implementing.

Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.

2016-08-02 Thread Matt Armstrong
Nicolas Petton writes: > [ Unknown signature status ] > Matt Armstrong writes: > >>> The AUTHORS file is not unmaintained, why are you saying that? >> >> I was going by David's related comment where he said the file had not >> changed in seven years: >>

Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.

2016-08-02 Thread Nicolas Petton
Matt Armstrong writes: >> The AUTHORS file is not unmaintained, why are you saying that? > > I was going by David's related comment where he said the file had not > changed in seven years: > id:1469191654-5922-1-git-send-email-da...@tethera.net. So, it is not > maintained

Re: notmuch and "mute" -- useful to anyone?

2016-08-02 Thread Amadeusz Żołnowski
This seems to be something that https://github.com/teythoon/afew already does, although it uses tag 'killed' instead. I think that alot e-mail client uses 'killed' tag as well. Maybe you could consider having that name instead or make it configurable with 'killed' as default? Cheers, -- Amadeusz

notmuch and "mute" -- useful to anyone?

2016-08-02 Thread Matt Armstrong
Is anyone else interested in Gmail-like "mute" support in notmuch.el? If so, I can think about polishing the below off and adding it to notmuch. I've managed to implement Gmail's "mute" in notmuch as follows in my notmuch-post-new:

A systematic way of handling Xapian lock errors?

2016-08-02 Thread Matt Armstrong
Simple notmuch commands like "notmuch tag" can fail to grab the Xapian lock. When this occurs they bail with: A Xapian exception occurred opening database: Unable to get write lock on /example/.notmuch/xapian: already locked I've noticed a few issues with this: 1) The notmuch command line

Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.

2016-08-02 Thread Matt Armstrong
Nicolas Petton writes: > [ Unknown signature status ] > Matt Armstrong writes: > >> Looking into this further, if AUTHORS file is essentially unmaintained, >> I need not touch it. > > The AUTHORS file is not unmaintained, why are you saying that? I was

Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.

2016-08-02 Thread Matt Armstrong
David Bremner writes: > Never argue with a happy lawyer, that's motto :). It sounds like we're > good to go; I merged patch 2/2 after moving the NEWS. Then I wanted to > shorten the summary line of the commit, which got a bit more intrusive > than I wanted, hopefully it

Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.

2016-08-02 Thread Nicolas Petton
Matt Armstrong writes: > Looking into this further, if AUTHORS file is essentially unmaintained, > I need not touch it. The AUTHORS file is not unmaintained, why are you saying that? signature.asc Description: PGP signature