It is pretty big and there are a couple places where the series could be simplified, the first patch in particular. I will break it out and resubmit piecewise but I'd like to know how to address these particular issues:

1. Are URIs the way to specify individual messages, despite bremner's concerns about too much of the API being strings? Is adding another library is the easiest way to parse URIs?

2. Is it OK to break maildir relocatability, or is it worth it to pass more config to the library (perhaps by adding it to the notmuch_database_t object)?

3. Is a global variable in the library acceptable? (I don't see any others.) If not, how to store mailstore state?

The patch series is really more like a very rough draft to try to give these concerns a context (specifically, mbox support).

Ethan