This is v2 of id:cover.1381948853.git.jani@nikula.org with more polish. Patches 1-4 do prep work to fix some of the differences in the parsers in advance. Arguably they are not that bad regardless of the parser change. Patches 5-6 actually make the change. Having two patches is a somewhat artificial division, but perhaps makes it easier to review. Patch 7 is just a hack to make perf tests not ignore so many mails... we have quite a bit of non-emails in the corpus by gmime parser standards. And this illustrates one of the differences in the parsers. BR, Jani. Jani Nikula (7): cli: sanitize tabs and newlines to spaces in notmuch search cli: refactor reply from guessing util: make sanitize string available in string util for reuse cli: sanitize the received header before scanning for replies lib: replace the header parser with gmime lib: parse messages only once HACK: fix broken messages in the perf test corpus lib/database.cc | 6 +- lib/index.cc | 70 +------- lib/message-file.c | 351 +++++++++++++------------------------- lib/message.cc | 6 + lib/notmuch-private.h | 20 ++- notmuch-reply.c | 186 ++++++++++++-------- notmuch-search.c | 17 -- performance-test/perf-test-lib.sh | 4 + test/search-output | 2 +- util/string-util.c | 22 +++ util/string-util.h | 7 + 11 files changed, 297 insertions(+), 394 deletions(-) -- 1.8.4.2