From: Carl Worth Date: Wed, 21 Oct 2009 07:34:36 +0000 (-0700) Subject: add_message: Add a type:mail ("Kmail") term to all documents. X-Git-Tag: 0.1~800 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6a3b68edeffa53c3e1c9aa156eff46c5999077c5;p=notmuch.git add_message: Add a type:mail ("Kmail") term to all documents. This gives us an easy way to specify "all mail messages" in a search query. We simply look for this term. --- diff --git a/database.cc b/database.cc index 5ee07059..1c1e590b 100644 --- a/database.cc +++ b/database.cc @@ -520,6 +520,8 @@ notmuch_database_add_message (notmuch_database_t *notmuch, try { doc.set_data (filename); + add_term (doc, "type", "mail"); + parents = g_ptr_array_new (); refs = notmuch_message_file_get_header (message, "references");