[PATCH 1/6] test: two new messages for the 'broken' corpus

2018-04-20 Thread David Bremner
These have an 'In-Reply-To' loop, which currently confuses "notmuch new". --- test/corpora/broken/loop/loop-12 | 8 test/corpora/broken/loop/loop-21 | 8 2 files changed, 16 insertions(+) create mode 100644 test/corpora/broken/loop/loop-12 create mode 100644

[PATCH 6/6] lib: choose oldest message when breaking reference loops

2018-04-20 Thread David Bremner
This preserves a sensible thread order --- lib/thread.cc| 33 - test/T050-new.sh | 1 - 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/lib/thread.cc b/lib/thread.cc index dbac002f..a6dc4e5a 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@

[PATCH 4/6] NEWS: add item for reference loop fix.

2018-04-20 Thread David Bremner
--- NEWS | 9 + 1 file changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 39ce7707..e9b1dcd9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +Notmuch 0.26.2 (UNRELEASED) +=== + +Library Changes +--- + +Make thread indexing more robust against

[PATCH 5/6] test: add known broken test for thread ordering from a loop

2018-04-20 Thread David Bremner
The previous loop handling code chooses the last message in the message list, which turns out to be the last in date order. See the comment in _notmuch_thread_create. --- test/T050-new.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index

[PATCH 3/6] lib: break reference loop by choosing arbitrary top level msg

2018-04-20 Thread David Bremner
Other parts of notmuch (e.g. notmuch show) expect each thread to contain at least one top level message, and crash if this expectation is not met. --- lib/thread.cc| 8 +++- test/T050-new.sh | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/thread.cc

[PATCH 2/6] test: add known broken test for indexing an In-Reply-To loop.

2018-04-20 Thread David Bremner
This documents the bug discussed in id:87d10042pu@curie.anarc.at --- test/T050-new.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index cd522364..b9854978 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -354,4 +354,9 @@ exit

v3 reference loop fix

2018-04-20 Thread David Bremner
this version obsoletes id:20180414014610.15438-1-da...@tethera.net changes: - simplified test messages from Tomi - deterministic thread order suggested by dkg ___ notmuch mailing list notmuch@notmuchmail.org

Bug? notmuch-emacs: "All tags" in notmuch-hello does not show all tags

2018-04-20 Thread Gregor Zattler
Dear notmuch-emacs developers, I use a certain tag which until now is only used with regards to one single message which is also tagged "spam". This certain tag is among the output of notmuch search --output=tags '*' The part of notmuch-hello which is supposed to show "All tags" does not show

Re: Database error

2018-04-20 Thread Varac
Quoting David Bremner (2018-04-20 14:44:25) > > » xapian-check .notmuch/xapian docdata: > > blocksize=8K items=564 firstunused=7 revision=7 levels=1 root=2 > > B-tree checked okay > > docdata table structure checked OK > > > > termlist: > > blocksize=8K items=305882 firstunused=64506

Re: [PATCH] lib: work around xapian bug with get_mset(0,0, x)

2018-04-20 Thread David Bremner
Daniel Kahn Gillmor writes: > But if we want a compile-time check, i don't think we'd need anything > fancier than something like (potentially even directly in query.cc): > > #if XAPIAN_AT_LEAST(1,4,6) > #define MSET_GET_MIN_COUNT 0 > #else > #define

Re: Database error

2018-04-20 Thread David Bremner
Varac writes: > Hi, > > I get a DatabaseError right after initial indexing. > I can reproduce this with my mails every time. > First, I remove the whole .notmuch/xapian directory and > run "notmuch new", which results in a DatabaseError when > using "xapian-check": > > > »