]> git.notmuchmail.org Git - notmuch/blobdiff - lib/index.cc
re-enable notmuch.sym generation using POSIX sed
[notmuch] / lib / index.cc
index 00478f8db53f054d7917705f9b18c073c8bfa098..e8e9922b408a4d59a771aedf6783fc73126b0ad0 100644 (file)
@@ -304,26 +304,6 @@ _index_address_list (notmuch_message_t *message,
     }
 }
 
-static const char *
-skip_re_in_subject (const char *subject)
-{
-    const char *s = subject;
-
-    if (subject == NULL)
-       return NULL;
-
-    while (*s) {
-       while (*s && isspace (*s))
-           s++;
-       if (strncasecmp (s, "re:", 3) == 0)
-           s += 3;
-       else
-           break;
-    }
-
-    return s;
-}
-
 /* Callback to generate terms for each mime part of a message. */
 static void
 _index_mime_part (notmuch_message_t *message,
@@ -345,6 +325,12 @@ _index_mime_part (notmuch_message_t *message,
        GMimeMultipart *multipart = GMIME_MULTIPART (part);
        int i;
 
+       if (GMIME_IS_MULTIPART_SIGNED (multipart))
+         _notmuch_message_add_term (message, "tag", "signed");
+
+       if (GMIME_IS_MULTIPART_ENCRYPTED (multipart))
+         _notmuch_message_add_term (message, "tag", "encrypted");
+
        for (i = 0; i < g_mime_multipart_get_count (multipart); i++) {
            if (GMIME_IS_MULTIPART_SIGNED (multipart)) {
                /* Don't index the signature. */
@@ -459,7 +445,6 @@ _notmuch_message_index_file (notmuch_message_t *message,
     _index_address_list (message, "to", addresses);
 
     subject = g_mime_message_get_subject (mime_message);
-    subject = skip_re_in_subject (subject);
     _notmuch_message_gen_terms (message, "subject", subject);
 
     _index_mime_part (message, g_mime_message_get_mime_part (mime_message));