We start modestly, with a (slightly modified) test case from Kazuo
Teramoto. Originally it just made sure the bindings didn't crash; here
we check that by comparing the output with that of notmuch search.
When I changed the calling convention to pass in all but the zero-th
argument to subcommands, I missed this one call, resulting in a
segmentation fault.
As a bonus, the syntax "notmuch --help foo" is now equivalent to
"notmuch help foo".
Due to 108-character limit in unix domain socket path this change
is required; it is more probable that length of ${TMPDIR:-/tmp} is
shorter than length of path to the current directory of notmuch test
source directory. One can expect to create reasonable-length unix
domain sockets wherever $TMPDIR points to.
The TEST_TMPDIR if first needed to hold dtach's socket (due
to 108-character limit in socket file names). Later it can be
used to hold other temporary files; directory deleted at exit.
More of a leap than a bump. This is a bit silly keeping 3 files
syncronized. At least for this file, I would prefer a solution that
generates notmuch.1 from some template at build time.
The additional "safety feature" documented here is motivated by the
fact that I use gpg-agent and I don't always get the GPG prompt that
Carl was relying on as an abort point. The new version also allows
more to be done in "dry run" mode.
We really did bump SONAME, and we probably will again, but not just
for a simple symbol addition.
Debian versions generally need to be removed from symbols file; this
wasn't a problem before because there was no Debian versions
Add options --offset=[-]N and --limit=M to notmuch search to determine the
first result and maximum number of results to display.
Option --limit=M limits the maximum number of results to display to M.
Option --offset=[-]N skips the first N results; with the leading '-' skip
until the Nth result from the end.
Note that --offset with a negative N for thread or summary output requires
counting the number of matching threads in advance.
Signed-off-by: Jani Nikula <jani@nikula.org>
Add function notmuch_query_count_threads() to get the number of threads
matching a search. This is done by performing a search and figuring out the
number of unique thread IDs in the matching messages, a significantly
heavier operation than notmuch_query_count_messages().
Signed-off-by: Jani Nikula <jani@nikula.org>
This is a rebase and cleanup of Istvan Marko's patch from
id:m3pqnj2j7a.fsf@zsu.kismala.com
Search retrieves these headers for every message in the search
results. Previously, this required opening and parsing every message
file. Storing them directly in the database significantly reduces IO
and computation, speeding up search by between 50% and 10X.
Taking full advantage of this requires a database rebuild, but it will
fall back to the old behavior for messages that do not have headers
stored in the database.
The main reason to introduce this new unexposed function is to allow
the buffer redisplay crypto switch to behaving in a more expected way.
The prefix to notmuch-show-redisplay buffer now switches the crypto
processing of the current show buffer, as opposed to switching the
logic of the notmuch-crypto-process-mime customization variable. This
behavior is more intuitive.