mu embeds a "vendored" subset of the libfmt package under thirdparty; but it's
better to use the system-package if the user has one.
So, use the system package if found or user -Duse-embedded-fmt=true is
specified.
Implement a new experimental json2 format for mu-find, which gets rid of
the ":" prefixes for fields, i.e., "subject" instead of ":subject".
Document it as well.
The json output (for mu-find etc.) just showed the converted sexp
output, including the clumsy emacs-style tstamps (for changed/date).
Add unix timestamps as well, which are easier to work with outside
emacs.
This handles #2770.
In Mu::parse_date_time, when provided with an empty string, return
time_t_max instead of G_MAXINT64. For systems with a 64-bit time_t, there
is no difference. With a 32-bit time_t it caused a test to fail:
not ok /utils/date-basic - ERROR:../mu-1.12.4/lib/utils/tests/test-utils.cc:92
void test_date_basic(): assertion failed
(parse_date_time(std::get<0>(test), std::get<1>(test)).value_or(-1)
== std::get<2>(test)): (18446744073709551615 == 2147483647)
This edge case probably only affected the test, as when other parts of
the application call parse_date_time (e.g. mu-server.cc and
mu-query-processor.cc), they check if the input string is empty first.
Seems journal logging fails on NetBSD (no surprise), but has some
unwanted/not-fully-understood side-effects.
In any case, outside Linux there's no use in even trying to use
journald; so we don't do that anymore.
Add conditional support for syslog (requires glib 2.80).
In musl, `stdout` is a macro that expands to `(stdout)`, and
`::(stdout)` is not valid C++.
../mu-1.12.2/lib/utils/mu-utils.hh:268:32: error: expected
id-expression before '(' token
268 | ::stdout);
| ^~~~~~
Nothing in the Mu namespace is named stdout, so it is safe to drop
the `::`.
Bug: https://bugs.gentoo.org/928361
Xapian supports an "ngrams" option to help with languages/scripts
without explicit wordbreaks, such as Chinese / Japanese / Korean.
Add some plumbing for supporting this in mu as well. Experimental for
now.