vim: fix regex after "notmuch show" output change

The new field "excluded" was added to the output and made this regex fail.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
vim: simplify build

There should be no functional changes, except that you don't need to
make the directories before installing.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
emacs: modify help message for notmuch-search-line-faces to reflect preferred "deleted" tag name.

No functional change here.  The help message previously referred to
the "delete" tag, but "deleted" is now preferred, so hopefully this
will reduce any potential confusion.
config: Fix free in 'config get' implementation.

The array returned by g_key_file_get_string_list() should be freed with
g_strfreev(), not free().
emacs: Put notmuch-print-mechanism in custom group notmuch-show
new: Consistently treat fatal errors as fatal

Previously, fatal errors in add_files_recursive were not treated as
fatal by its callers (including itself!).  This makes
add_files_recursive errors consistently fatal and updates all callers
to treat them as fatal.
new: Handle fatal errors in remove_filename and _remove_directory

Previously such errors were simply ignored.  Now they cause an
immediate cleanup and abort.
new: Print final fatal error message to stderr

This was going to stdout.  I removed the newline at the beginning of
printing the fatal error message because it wouldn't make sense if you
were only looking at the stderr stream (e.g., you had redirected
stdout to /dev/null).
new: Fix missing end_atomic in remove_filename on error

Previously, if we failed to find the message by filename in
remove_filename, we would return immediately from the function without
ending its atomic block.  Now this code follows the usual goto DONE
idiom to perform cleanup.
emacs: Put notmuch-hello-sections in custom group notmuch-hello
util: Rename error_util.h to error-util.h

This makes it consistent with the rest of notmuch's source.
test: Add $TEST_DIRECTORY to the Python path

This makes it easy to move Python test code into modules.
util: Add an abstraction for file locking

This is a fairly basic wrapper around fcntl locking.  For now, it
merely attempts to make it usable (a surprisingly difficult feat), but
this is a step toward a more sophisticated locking API.
lib: Using blocking read/write locks with the notmuch database

For database writers, this eliminates Xapian exceptions when multiple
writers try to access the database simultaneously (instead, they will
simply block).  For readers, this eliminates the dreaded
DatabaseModifiedError.

There are downsides to this, of course.  In particular, previously,
readers could *usually* get away with lock-free access to the
database, even if there was a concurrent writer.  With this change,
readers are always safe, but may have to block.  The following patches
will address this to get the best of both worlds.

Library users do not have to do anything to take advantage of this
since the locking mode is derived from the database access mode.
Technically, this behavior is not backwards-compatible, since it could
break library users that do subtle things with database concurrency
(things that were almost certainly wrong, since libnotmuch previously
provided no way to do them right).  However, after an IRC discussion
with cworth, we concluded that the existing behavior (the database
fails to open with no status code for conflicting writers; readers can
get concurrent modification exceptions and have no way to deal with
them) was simply undesirable and that it was best to keep the API
simple and clean.
new: Use a "notmuch new" lock around the entire new operation

In particular, we continue to hold this lock during the post-new
script, even though we don't hold the database lock at this point.
This prevents "notmuch new" from running concurrently with a post-new
hook and changing the set of messages, which could result in races
with tagging operations in the post-new script.
util: Add yield-to-shared support to file locking abstraction

This modifies the file locking abstraction to implement a locking
protocol that allows exclusive lockers to detect pending shared
lockers and temporarily yield the lock to them.  This may seem like an
odd operation, but it's a perfect match for Xapian's opportunistic
snapshot isolation.
lib: Support yielding the database to readers

This is a direct application of the lock yielding introduced in the
previous patch.  This is a natural fit for Xapian's concurrency model.
Xapian allows readers to access the database concurrently with a
writer, but may raise a DatabaseModifiedException.  The lock yielding
protocol explicitly passes control of the database to readers and
ensures that no writes will occur until they have released the
database, eliminating the danger of a DatabaseModifiedException.
Since Xapian allows this type of concurrent access, the writer does
not have to close the database for this to work (if it did, yielding
would be harder to use).
python: Wrap notmuch_database_yield_to_readers
test: Add tests for database yielding
new, tag: Add calls to yield to readers

This makes it possible to run read-only operations concurrently with
modification operations and guarantee that the read-only operations
will see a consistent view of the database.