aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.h
Commit message (Collapse)AuthorAge
* Rename message_results/thread_results to messages/threads.Gravatar Carl Worth2009-10-31
| | | | Shorter naming without being any less clear. A definite win.
* notmuch search: Add (relative) date to search outputGravatar Carl Worth2009-10-29
| | | | | The new function for formatting relative dates is nice enough that we need to start using it more places. Here's one of them.
* notmuch show: Add a one-line summary of the message before the header.Gravatar Carl Worth2009-10-29
| | | | | The idea here is that a client could usefully display just this one line while optionally hiding the other header fields.
* notmuch show: Add body of message as well.Gravatar Carl Worth2009-10-29
| | | | | This is just the raw message body for now, (so any MIME parsing will be up to the consumer). And this will likely change in the future.
* notmuch show: Initial implementation (headers only)Gravatar Carl Worth2009-10-29
| | | | | | | We're using a delimiter syntax that Keith is optimistic about being able to easily parse in emacs. Note: We're not escaping any occurrence of the delimiters in the message yet, so we'll need to fix that.
* Fix add_message and get_filename to strip/re-add the database path.Gravatar Carl Worth2009-10-28
| | | | | We now store only a relative path inside the database so the database is not nicely relocatable.
* notmuch_database_add_message: Do not return a message on failure.Gravatar Carl Worth2009-10-27
| | | | | | | The recent, disastrous failure of "notmuch new" would have been avoided with this change. The new_command function was basically assuming that it would only get a message object on success so wasn't destroying the message in the other cases.
* notmuch restore: Fix to remove all tags before adding tags.Gravatar Carl Worth2009-10-26
| | | | | | | | | | | | This means that the restore operation will now properly pick up the removal of tags indicated by the tag just not being present in the dump file. We added a few new public functions in order to support this: notmuch_message_freeze notmuch_message_remove_all_tags notmuch_message_thaw
* add_message: Add an optional parameter for getting the just-added message.Gravatar Carl Worth2009-10-26
| | | | | We use this to implement the addition of "inbox" and "unread" tags for all messages added by "notmuch new".
* Add public notmuch_thread_get_subjectGravatar Carl Worth2009-10-26
| | | | | And use this in "notmuch search" to display subject line as well as thread ID.
* Add notmuch_thread_get_tagsGravatar Carl Worth2009-10-26
| | | | | And augment "notmuch search" to print tag values as well as thread ID values. This tool is almost usable now.
* Add an initial implementation of a notmuch_thread_t object.Gravatar Carl Worth2009-10-25
| | | | | | | | | | | | | | | | | | | We've now got a new notmuch_query_search_threads and a notmuch_threads_result_t iterator. The thread object itself doesn't do much yet, (just allows one to get the thread_id), but that's at least enough to see that "notmuch search" is actually doing something now, (since it has been converted to print thread IDs instead of message IDs). And maybe that's all we need. Getting the messages belonging to a thread is as simple as a notmuch_query_search_messages with a string of "thread:<thread-id>". Though it would be convenient to add notmuch_thread_get_messages which could use the existing notmuch_message_results_t iterator. Now we just need an implementation of "notmuch show" and we'll have something somewhat usable.
* Rename notmuch_query_search to notmuch_query_search_messagesGravatar Carl Worth2009-10-25
| | | | | | | | | | Along with renaming notmuch_results_t to notmuch_message_results_t. The new type is quite a mouthful, but I don't expect it to be used much other than the for-loop idiom in the documentation, (which does at least fit nicely within 80 columns). This is all in preparation for the addition of a new notmuch_query_search_threads of course.
* Change database to store only a single thread ID per message.Gravatar Carl Worth2009-10-25
| | | | | | | | | | | | Instead of supporting multiple thread IDs, we now merge together thread IDs if one message is ever found to belong to more than one thread. This allows for constructing complete threads when, for example, a child message doesn't include a complete list of References headers back to the beginning of the thread. It also simplifies dealing with mapping a message ID to a thread ID which is now a simple get_thread_id just like get_message_id, (and no longer an iterator-based thing like get_tags).
* add_message: Propagate error status from notmuch_message_create_for_message_idGravatar Carl Worth2009-10-25
| | | | What a great feeling to remove an XXX comment.
* notmuch_database_create: Document idea to (optionally) return a statusGravatar Carl Worth2009-10-24
| | | | | | | The current problem is that when this function fails the caller doesn't get any information about what the particular failure was, (something in the filesystem? or in Xapian?). We should fix that.
* Re-order documentation a bit.Gravatar Carl Worth2009-10-23
| | | | | | The notmuch_database_get_default_path function is unique in not accepting a notmuch_database_t* (nor creating one). So list it outside the other notmuch_database functions.
* notmuch_message_get_filename: Improve documentation.Gravatar Carl Worth2009-10-23
| | | | | Fix a typo, and add clarifications about the lifetime and readonly nature of the return value.
* Add NOTMUCH_STATUS_DUPLICATE_MESSAGE_IDGravatar Carl Worth2009-10-23
| | | | | | | | | And document that notmuch_database_add_message can return this value. This pushes the hard decision of what to do with duplicate messages out to the user, but that's OK. (We weren't really doing anything with these ourselves, and this way the user is at least informed of the issue, rather than it just getting papered over internally.)
* Clean up comments to not include spaces before tabs.Gravatar Carl Worth2009-10-23
| | | | | | This were just unclean, (an invisble sort of uncleanliness, but still there are liable to make for ugly diffs). Oh, wait, like this one! But at least it's not sprinkled among code changes.
* Clarify documentation and error string for NOTMUCH_STATUS_TAG_TOO_LONGGravatar Carl Worth2009-10-23
| | | | It's helpful to point out NOTMUCH_STATUS_TAG_MAX for users.
* Add notmuch_database_set_timestamp and notmuch_database_get_timestampGravatar Carl Worth2009-10-23
| | | | | These will be very helpful to implement an efficient "notmuch new" command which imports new mail messages that have appeared.
* Fix notmuch_message_get_message_id to never return NULL.Gravatar Carl Worth2009-10-23
| | | | | | With the recent improvements to the handling of message IDs we "know" that a NULL message ID is impossible, (so we simply abort if the impossible happens).
* Add notmuch_message_get_filenameGravatar Carl Worth2009-10-23
| | | | | | | | This is a new public function to find the filename of the original email message for a message-object that was found in the database. We may change this function in the future to support returning a list of filenames, (for messages with duplicate message IDs).
* Generate message ID (using SHA1) when a mail message contains none.Gravatar Carl Worth2009-10-22
| | | | | | This is important as we're using the message ID as the unique key in our database. So previously, all messages with no message ID would be treated as the same message---not good at all.
* 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.