aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-11-23 18:11:04 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-11-23 18:11:04 -0800
commitc7b4d15d0ad78b6f28b50310358ae255e6a08008 (patch)
treeee59f443c5f17d01bb2bdcd3bbfc5af203e56a6e
parentfb4ded1cc9de716b0e8d8b6dacce2417a9c421cb (diff)
Fix to index the "Re" term present in any subject.
This was a misfeature where notmuch had extra code that just threw away legitimate information. It was never indexing an initial "Re" term in a subject. But some users have legitimately wanted to search for this term. The original code was written this way merely for strict compatiblity with the indexing performed by sup, but we're not taking advantage of that now anyway.
-rw-r--r--lib/index.cc21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/index.cc b/lib/index.cc
index 00478f8d..bdfb8ed5 100644
--- a/lib/index.cc
+++ b/lib/index.cc
@@ -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,
@@ -459,7 +439,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));