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: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=6a3b68edeffa53c3e1c9aa156eff46c5999077c5;hp=af65f52acf4eac5b2187855a63895afe3386c074 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");