Commit Graph

14 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 3dd721d5a3 clang-format: update c/cc coding style
Update all cc code using .clang-format; please do so as well for future PRs
etc.; emacs has a handy 'clang-format' mode to make this automatic.

For comparing old changes with git blame, we can disregard this one using
--ignore-rev

(see https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame )
2021-10-20 12:26:16 +03:00
Dirk-Jan C. Binnema ab51f1553b thread-subject: make even laxer:
compare subject from the *last* plus any spaces.
2021-08-11 22:24:28 +03:00
Dirk-Jan C. Binnema 9a31225ef4 thread-subject: ignore '<prefix>:' when comparing
Should catch most cases.

Fixes: #2083.
2021-08-11 15:16:54 +03:00
Dirk-Jan C. Binnema b7844358d2 threads: recurse thread-subject check
Not only check for duplicate subjects in *siblings*, also recurse into
the children. This remove some clutter from deeply nested threads.

Fixes: #2078.
2021-08-10 22:10:39 +03:00
Dirk-Jan C. Binnema 473d3998ce mu: calculate thread subjects
Calculate the thread subject, that is, the subject of the (sub)thread _or_
empty if it's the same as the previous subject.

This is for the UI feature of _not_ showing the subject when it's just
repeating from the previous.
2021-05-04 17:34:47 +03:00
Dirk-Jan C. Binnema 8c9430a09a query: improve thread-date handling
And make it available in query_match, so we can expose it to elisp.
2021-05-02 23:30:32 +03:00
Nicolas Avrutin 8ccd8f5425 threads: fix flag handling of orphan children
Even if a container has no query_match, it may still have children that need to
have flags applied.

This was broken by 6ff9829ce1.

Fixes: #1995
2021-05-02 14:27:11 -04:00
Dirk-Jan C. Binnema 579f841bdd query: filter out docs without query-matches
This avoid including unwanted messages in threaded results.
Also some cleanups.
2021-02-15 19:11:22 +02:00
Dirk-Jan C. Binnema 6ff9829ce1 lib: improve threaded sorting
Improve threaded sorting:
- rework the recursive algo (which should a crash noted earlier)
- sort by thread key (as in 1.5.7)

Fixes: #1923
Fixes: #1922
Fixes: #1911
Fixes: #1916
2021-02-10 12:35:19 +02:00
Dirk-Jan C. Binnema ba895bc65e mu-query-result: detect thread-subjects
Ongoing... try to determine the thread-subject, to be used in mu4e
later.
2021-01-29 22:44:45 +02:00
Dirk-Jan C. Binnema e5a52e45fd mu-threads: improve sorting, duplicate handling
And add some more tests.
2021-01-27 22:28:58 +02:00
Dirk-Jan C. Binnema 7f70149c95 threads: don't assert on remove_child
Investigate this, seems to hit in the wild.
2021-01-25 21:44:02 +02:00
Dirk-Jan C. Binnema 3e64fdfb0f threads: avoid assert
The assert failure was spotted in the wild... we need to investigate,
but we can ignore it now to avoid SIGABRT.
2021-01-25 18:11:50 +02:00
Dirk-Jan C. Binnema 95dffb98a6 query: Rework querying/threading machinery
Rewrite the query machinery in c++:
- use an MSet decorator instead of the mu-msg-iter stuff
- use mu-query-decider to mark duplicates/unreadable/related messages
- use mu-query-threader to replace the older container/thread code

Algorithm did not substantially change, but the implementation details
did.
2021-01-20 14:09:04 +02:00