summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2019-03-24mu: update crypto verify testdjcb
2019-03-24mu: fix utf-8 flattendjcb
2019-03-23utils: small optimization in utf8_flattendjcb
In the common path, avoid building an unneeded std::string. This should up in some profiles.
2019-02-18mu: don't include text attachments as part of bodydjcb
It's somewhat nice in some case, but not generally so; so let's not do it.
2019-01-17Merge pull request #1359 from OnkelUlla/fix_compiler_warningsDirk-Jan C. Binnema
Fix compiler warnings
2019-01-13Merge pull request #1284 from nicolasavru/limit-threading-setDirk-Jan C. Binnema
Perform threading calculation on related set instead of entire result.
2019-01-11parser: fix clang-7.0.1 warningsUlrich Ölmann
Without this commit clang++-7.0.1 whines | CXX parser.lo | parser.cc:138:15: warning: braces around scalar initializer [-Wbraced-scalar-init] | return Tree({{Node::Type::Range}, | ^~~~~~~~~~~~~~~~~~~
2019-01-11mu, tests: fix gcc-8.2.0 warningsUlrich Ölmann
Without this commit gcc-8.2.0 whines | CC mu-msg-json.lo | mu-msg-json.c: In function ‘get_temp_file_maybe’: | mu-msg-json.c:254:14: warning: unused variable ‘tmpfile’ [-Wunused-variable] | char *tmp, *tmpfile; | ^~~~~~~ | mu-msg-json.c:254:8: warning: unused variable ‘tmp’ [-Wunused-variable] | char *tmp, *tmpfile; | ^~~ | mu-msg-json.c: In function ‘add_part_crypto’: | mu-msg-json.c:276:21: warning: unused variable ‘s’ [-Wunused-variable] | char *signers, *s; | ^ | mu-msg-json.c:276:11: warning: unused variable ‘signers’ [-Wunused-variable] | char *signers, *s; | ^~~~~~~ | mu-msg-json.c: In function ‘each_part’: | mu-msg-json.c:332:14: warning: variable ‘cid’ set but not used [-Wunused-but-set-variable] | const char *cid; | ^~~ and | CC test-mu-str.o | test-mu-str.c: In function ‘test_mu_str_subject_normalize’: | test-mu-str.c:282:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "test123", "test123" }, | ^~~~~~~~~ | test-mu-str.c:282:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "test123", "test123" }, | ^~~~~~~~~ | test-mu-str.c:283:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "Re:test123", "test123" }, | ^~~~~~~~~~~~ | test-mu-str.c:283:19: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "Re:test123", "test123" }, | ^~~~~~~~~ | test-mu-str.c:284:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "Re: Fwd: test123", "test123" }, | ^~~~~~~~~~~~~~~~~~ | test-mu-str.c:284:25: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "Re: Fwd: test123", "test123" }, | ^~~~~~~~~ | test-mu-str.c:285:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "Re[3]: Fwd: test123", "test123" }, | ^~~~~~~~~~~~~~~~~~~~~ | test-mu-str.c:285:28: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "Re[3]: Fwd: test123", "test123" }, | ^~~~~~~~~ | test-mu-str.c:286:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "operation: mindcrime", "operation: mindcrime" }, /*...*/ | ^~~~~~~~~~~~~~~~~~~~~~ | test-mu-str.c:286:29: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "operation: mindcrime", "operation: mindcrime" }, /*...*/ | ^~~~~~~~~~~~~~~~~~~~~~ | test-mu-str.c:287:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "", "" } | ^~ | test-mu-str.c:287:9: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] | { "", "" } | ^~
2018-12-30mu: make attachment test a bit looserdjcb
Consider all 'inline' text parts attachments too, unless they're 'text/plain' or something that looks like a signature. It's a heuristic so we might get some new corner-cases.. let's see.
2018-11-11parser: avoid query parsing errordjcb
See #1261.
2018-11-11mu: implement mu_msg_to_jsondjcb
Follows mu_msg_to_sexp, but instead uses json as the output format, using json-glib.
2018-11-11mu: add soft dependency on json-glibdjcb
If it's available it will be used.
2018-11-11mu: add mu_msg_iter_is_(first|last)djcb
This makes it a bit easier to process the output.
2018-11-04mu: fake reply-to for mailing-list postsdjcb
Some mailing lists do _not_ set reply-to, see e.g., https://github.com/djcb/mu/pull/1278 In that case, use the 'List-Post' address instead, so the behavior is the same (in mu4e) as for other mailing lists.
2018-11-04add optional support for building with asandjcb
2018-08-18Merge branch 'pr-1111'djcb
Fix a bunch of conflicts, tests.
2018-08-14mu: decode rfc-2047-encoded mailing listsdjcb
Fixes #1292. Note: does require rebuilding the mu database (--rebuild).
2018-08-14mu: protect against overly long keysdjcb
We got some errors when some of the key values exceeded the Xapian maximum; in particular the message-id. So make all the key-methods check, and truncate the message-id if necessary.
2018-07-09Perform threading calculation on related set instead of entire result.Nicolas Avrutin
The current threading algorithm is applied to the entire result of a query, even if maxnum is specified, and then the result of the threading algorithm is truncated to maxnum. The improves threading results by returning the entire thread even when only a single message makes it into the top maxnum results. This commit applies the threading algorithm to the related message set of the maxnum-truncated query result instead of to the entire query result. For a given set of messages, the set of messages which will share threads with any of the original messages is exactly the related message sets. Put another way, either any messages returned by the original query but removed by the maxnum truncation will also be returned by the related message query, or they would not have been needed anyway because they would not be members of any visible thread. To maintain backward compatibility and allow threading to be used without including related messages, the related message set is found for the threading calculation, but any messages which would not have matched the original query are then pruned, resulting in a superset of the truncated query, but a subset of the untruncated query. This does not improve (or degrade) the run time of a threading calculation when maxnum is not set, but significant improves it when maxnum is set by making it scale (roughly) linearly in terms of maxnum. On a maildir with ~200k messages and maxnum set to 500 (the default), the run time of a threading calculation is lowered from ~1m to ~0.1s. Perform threading calculation on related set instead of entire result. The current threading algorithm is applied to the entire result of a query, even if maxnum is specified, and then the result of the threading algorithm is truncated to maxnum. The improves threading results by returning the entire thread even when only a single message makes it into the top maxnum results. This commit applies the threading algorithm to the related message set of the maxnum-truncated query result instead of to the entire query result. For a given set of messages, the set of messages which will share threads with any of the original messages is exactly the related message sets. Put another way, either any messages returned by the original query but removed by the maxnum truncation will also be returned by the related message query, or they would not have been needed anyway because they would not be members of any visible thread. To maintain backward compatibility and allow threading to be used without including related messages, the related message set is found for the threading calculation, but any messages which would not have matched the original query are then pruned, resulting in a superset of the truncated query, but a subset of the untruncated query. This does not improve (or degrade) the run time of a threading calculation when maxnum is not set, but significant improves it when maxnum is set by making it scale (roughly) linearly in terms of maxnum. On a maildir with ~200k messages and maxnum set to 500 (the default), the run time of a threading calculation is lowered from ~1m to ~0.1s.
2018-06-11mu: fix strncpy usagedjcb
Ensure the resulting strings are \0-terminated.
2018-05-19only use OP_WILDCARD for xapian >= 1.3.3djcb
It's not available for earlier versions.
2018-05-19query-parser: special-case wildcardsdjcb
We were transforming wild-card searches into regular-expression searches; while that works, it's also significantly slower. So, instead, special-case wildcards, and use the Xapian machinery for wildcard queries.
2018-04-23lib: add last_child flag to thread informationMarcelo Henrique Cerri
With that flag it's possible to reconstruct the entire thread tree structure in mu4e.
2018-03-31parser/tests: allow for DST changedjcb
e.g. 21d / 2w are subject to DST; update the tolerance.
2018-03-31mu: avoid runtime warningdjcb
2018-03-10mu: _XOPEN_SOURCE: fix typodjcb
2018-02-17lib/parser: fix month daysdjcb
In the olden days, we stored dates like e.g. 20180131121234, and do a lexicographical check. With that, we could use e.g. upper-limits 201802312359 for "all dates in Feb 2018", even if Feb doesn't have 31 days. However, nowadays we use time_t values, and g_date_time_new_local raises errors for non-existent days; easiest fix is to massage things a bit; so let's do that. Fixes issue #1197.
2018-02-11lib/parser: use g_vasprintf, _XOPEN_SOURCEdjcb
Attempt to restore building on Cygwin.
2017-12-03mu: support 'raw' query (internally)djcb
Allow for passing 'raw' queries to xapian, without any parsing.
2017-12-03parser: promote single value to a range for range-fieldsdjcb
Treat e.g. 'date:20170101' as 'date:20170101..20170101', just like the Xapian parser does.
2017-11-05cosmetic1.0-alpha1djcb
2017-11-04parser: small regex optimizationdjcb
2017-11-04parser/utils: enforce 64-bit times on 32-bit platformsdjcb
don't assume a 64-bit platform.
2017-11-04test-str: fix arglist testdjcb
2017-11-04parser: handle implicit 'and not'djcb
2017-11-02query: don't be too eager matching field namesdjcb
only match shortcuts when the field length was 1.
2017-10-31parser: fix and-not precedencedjcb
For now, don't treat "and not" specially; this gets us back into a somewhat working state. At some point, we probably _do_ want to special-case and_not though (since Xapian supports it).
2017-10-30mu: fix quoting/unquoting parametersdjcb
2017-10-30doc: tickledjcb
Don't error out when asked for tickle docs.
2017-10-30mu: use correct conversion for sizedjcb
This changed with the new parser.
2017-10-30mu: fix clang builddjcb
casting error
2017-10-29mu: some optimizationsdjcb
add fast-path for (common) plain-ascii. fix silly static misuse. should improve indexing with some single-digit percentage.
2017-10-28tokenizer: clean unicode-awaredjcb
2017-10-28parser: add more testsdjcb
2017-10-27server: update query processingdjcb
fix quoting issues with mu4e
2017-10-27phrases: only allow for index fieldsdjcb
2017-10-27parser: fix some post-c++14 codedjcb
don't require anything post c++14
2017-10-27query-parser: cleanup source stringdjcb
Ensure there's no non-' ' whitespace, and no trailing/leading spaces.
2017-10-26query-parser: support phrase queriesdjcb
2017-10-25mu: remove some dead codedjcb