notmuch/lib
Jesse Rosenthal 4971b85641 Name thread based on matching msgs instead of first msg.
At the moment all threads are named based on the name of the first message
in the thread. However, this can cause problems if people either start
new threads by replying-all (as unfortunately, many out there do) or
change the subject of their mails to reflect a shift in a thread on a
list.

This patch names threads based on (a) matches for the query, and (b) the
search order. If the search order is oldest-first (as in the default
inbox) it chooses the oldest matching message as the subject. If the
search order is newest-first it chooses the newest one.

Reply prefixes ("Re: ", "Aw: ", "Sv: ", "Vs: ") are ignored
(case-insensitively) so a Re: won't change the subject.

Note that this adds a "sort" argument to _notmuch_thread_create and
_thread_add_matched_message, so that when constructing the thread we can
be aware of the sort order.

Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
2010-04-21 14:56:53 -07:00
..
database-private.h Fix printf for when uint64_t != unsigned long long int 2010-02-09 11:14:16 -08:00
database.cc lib: Remove condition regarding a NULL parent_thread_id. 2010-04-12 15:54:03 -07:00
directory.cc lib: Rename iterator functions to prepare for reverse iteration. 2010-03-09 09:22:29 -08:00
index.cc Do not segfault on empty mime parts 2010-04-13 08:49:06 -07:00
libsha1.c libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00
libsha1.h libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00
Makefile Makefiles: Use .DEFAULT to support arbitrary targets from sub directories. 2010-01-06 10:32:06 -08:00
Makefile.local Makefile: Add library version information on OS X. 2010-04-14 16:18:19 -07:00
message-file.c fix notmuch_message_file_get_header 2010-04-06 18:47:28 -07:00
message.cc lib: Silence a compiler warning. 2010-03-09 12:07:26 -08:00
messages.c lib: Rename iterator functions to prepare for reverse iteration. 2010-03-09 09:22:29 -08:00
notmuch-private.h Name thread based on matching msgs instead of first msg. 2010-04-21 14:56:53 -07:00
notmuch.h Fix typo in notmuch.h documentation regarding database open modes 2010-04-13 08:39:10 -07:00
query.cc Name thread based on matching msgs instead of first msg. 2010-04-21 14:56:53 -07:00
sha1.c Typsos 2009-11-18 03:21:36 -08:00
tags.c lib: Rename iterator functions to prepare for reverse iteration. 2010-03-09 09:22:29 -08:00
thread.cc Name thread based on matching msgs instead of first msg. 2010-04-21 14:56:53 -07:00
xutil.c xutil: Implement xstrndup without relying on strndup. 2009-12-01 12:51:39 -08:00
xutil.h libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00