aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.h
Commit message (Collapse)AuthorAge
* Add notmuch_status_to_string function.Gravatar Carl Worth2009-10-21
| | | | | Be kind and let the user print error messages, not just error codes.
* Add notmuch_message_add_tag and notmuch_message_remove_tagGravatar Carl Worth2009-10-21
| | | | | With these two added, we now have enough functionality in the library to implement "notmuch restore".
* notmuch_query_search: Clarify the documentation.Gravatar Carl Worth2009-10-21
| | | | | | | | This is where we wanted to put the note to recommend the user call notmuch_message_destroy if the lifetime of the message is much shorter than the lifetime of the query. (Somehow this had ended up in the documentation of notmuch_message_get_tags before.)
* notmuch.h: Fix some copy-paste errors in the documentaton.Gravatar Carl Worth2009-10-21
| | | | | In several places we had "results" where "tags" was intended. It actually read fine in some cases, but this is still better.
* database: Add new notmuch_database_find_messageGravatar Carl Worth2009-10-21
| | | | | | | With this function, and the recently added support for notmuch_message_get_thread_ids, we now recode the find_thread_ids function to work just the way we expect a user of the public notmuch API to work. Not too bad really.
* Add notmuch_message_get_thread_ids functionGravatar Carl Worth2009-10-21
| | | | | | Along with all of the notmuch_thread_ids_t iterator functions. Using a consistent idiom seems better here rather than returning a comma-separated string and forcing the user to parse it.
* query: Remove the magic NOTMUCH_QUERY_ALLGravatar Carl Worth2009-10-20
| | | | | | | Using the address of a static char* was clever, but really unnecessary. An empty string is much less magic, and even easier to understand as the way to query everything from the database.
* Add destroy functions for results, message, and tags.Gravatar Carl Worth2009-10-20
| | | | | | | | | | | | None of these are strictly necessary, (everything was leak-free without them), but notmuch_message_destroy can actually be useful for when one query has many message results, but only one is needed to be live at a time. The destroy functions for results and tags are fairly gratuitous, as there's unlikely to be any benefit from calling them. But they're all easy to add, (all of these functions are just wrappers for talloc_free), and we do so for consistency and completeness.
* Implement 'notmuch dump'.Gravatar Carl Worth2009-10-20
| | | | | | | | | | | | | | | | This is a fairly big milestone for notmuch. It's our first command to do anything besides building the index, so it proves we can actually read valid results out from the index. It also puts in place almost all of the API and infrastructure we will need to allow searching of the database. Finally, with this change we are now using talloc inside of notmuch which is truly a delight to use. And now that I figured out how to use C++ objects with talloc allocation, (it requires grotty parts of C++ such as "placement new" and "explicit destructors"), we are valgrind-clean for "notmuch dump", (as in "no leaks are possible").
* notmuch_database_create/open: Fix to handle NULL as documented.Gravatar Carl Worth2009-10-20
| | | | | | | | | | | When documenting these functions I described support for a NOTMUCH_BASE environment variable to be consulted in the case of a NULL path. Only, I had forgotten to actually write the code. This code exists now, with a new, exported function: notmuch_database_default_path
* notmuch: Ignore files that don't look like email messages.Gravatar Carl Worth2009-10-19
| | | | | | | This is helpful for things like indexes that other mail programs may have left around. It also means we can make the initial instructions much easier, (the user need not worry about moving away auxiliary files from some other email program).
* notmuch: Start actually adding messages to the index.Gravatar Carl Worth2009-10-18
This is the beginning of the notmuch library as well, with its interface in notmuch.h. So far we've got create, open, close, and add_message (all with a notmuch_database prefix). The current add_message function has already been whittled down from what we have in notmuch-index-message to add only references, message-id, and thread-id to the index, (that is---just enough to do thread-linkage but nothing for full-text searching). The concept here is to do something quickly so that the user can get some data into notmuch and start using it. (The most interesting stuff is then thread-linkage and labels like inbox and unread.) We can defer the full-text indexing of the body of the messages for later, (such as in the background while the user is reading mail). The initial thread-stitching step is still slower than I would like. We may have to stop using libgmime for this step as its overhead is not worth it for the simple case of just parsing the message-id, references, and in-reply-to headers.