21 months agoMerge tag 0.28.4
David Bremner [Sun, 5 May 2019 19:38:51 +0000 (16:38 -0300)]
Merge tag 0.28.4

No functionality changes merged, since the bug in question was already
fixed on master.

21 months agodebian: changelog for 0.28.4-1 0.28.4 archive/debian/0.28.4-1 debian/0.28.4-1
David Bremner [Sun, 5 May 2019 11:09:30 +0000 (08:09 -0300)]
debian: changelog for 0.28.4-1

21 months agoversion: bump to 0.28.4
David Bremner [Sun, 5 May 2019 11:06:07 +0000 (08:06 -0300)]
version: bump to 0.28.4

21 months agoNEWS: NEWS for 0.28.4
David Bremner [Sun, 5 May 2019 11:04:53 +0000 (08:04 -0300)]
NEWS: NEWS for 0.28.4

21 months agocli/show: avoid empty write to stdout in format_part_raw
David Bremner [Sat, 4 May 2019 22:29:08 +0000 (19:29 -0300)]
cli/show: avoid empty write to stdout in format_part_raw

Previously if the input was exactly a multiple of the internal buffer
size, notmuch would attempt to fwrite nothing to stdout, but still
expected fwrite to return 1, causing a failure that looked like this:

  $ notmuch show --format=raw
    ...entire message shown as expected..
  Error: Write failed
  $ echo $?

To fix the problem don't call fwrite at all when there's nothing to

Amended by db: add some tests of message sizes likely to cause this

21 months agocli/notmuch-show: support gzipped files
David Bremner [Sun, 24 Mar 2019 03:32:44 +0000 (00:32 -0300)]
cli/notmuch-show: support gzipped files

This drops "file" from mime_node_context and just uses a local
variable. It also uses the new gzip aware utility routines recently
added to util/gmime-extra.c. The use of gzopen / gzfile in addition is
a bit icky, but the choice is between that, and providing yet another
readline implimentation that understands GMime streams.

21 months agolib/message_file: open gzipped files
David Bremner [Sun, 24 Mar 2019 03:32:43 +0000 (00:32 -0300)]
lib/message_file: open gzipped files

Rather than storing the lower level stdio FILE object, we store a
GMime stream. This allows both transparent decompression, and passing
the stream into GMime for parsing. As a side effect, we can let GMime
close the underlying OS stream (indeed, that stream isn't visible here

This change is enough to get notmuch-{new,search} working, but there is still
some work required for notmuch-show, to be done in a following commit.

21 months agoutil/gmime-extra: add g_mime_stream_gzfile_{new, open}
David Bremner [Sat, 30 Mar 2019 13:03:01 +0000 (10:03 -0300)]
util/gmime-extra: add g_mime_stream_gzfile_{new, open}

These are usable as standard GMime streams, and transparently
decompress gzipped files.

21 months agotravis: bump gmime depends to 3.0
David Bremner [Fri, 3 May 2019 09:59:23 +0000 (06:59 -0300)]
travis: bump gmime depends to 3.0

This is currently unsatisfiable, but at least the build should fail in
a comprehensible way.

21 months agogmime-cleanup: no longer need to use GMime major version during build
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:47 +0000 (09:19 -0400)]
gmime-cleanup: no longer need to use GMime major version during build

Signed-off-by: Daniel Kahn Gillmor <>
21 months agogmime-cleanup: pass NULL as default GMimeParserOptions
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:46 +0000 (09:19 -0400)]
gmime-cleanup: pass NULL as default GMimeParserOptions

This is a functional change, not a straight translation, because we
are no longer directly invoking g_mime_parser_options_get_default(),
but the GMime source has indicated that the options parameter for
g_mime_parser_construct_message() is "nullable" since upstream commit
d0ebdd2ea3e6fa635a2a551c846e9bc8b6040353 (which itself precedes GMime

Signed-off-by: Daniel Kahn Gillmor <>
21 months agogmime-cleanup: pass NULL arguments explicitly where GMime 3.0 expects it
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:45 +0000 (09:19 -0400)]
gmime-cleanup: pass NULL arguments explicitly where GMime 3.0 expects it

Several GMime 2.6 functions sprouted a change in the argument order in
GMime 3.0.  We had a compatibility layer here to be able to handle
compiling against both GMime 2.6 and 3.0.  Now that we're using 3.0
only, rip out the compatibility layer for those functions with changed
argument lists, and explicitly use the 3.0 argument lists.

Signed-off-by: Daniel Kahn Gillmor <>
21 months agogmime-cleanup: use GMime 3.0 function names
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:44 +0000 (09:19 -0400)]
gmime-cleanup: use GMime 3.0 function names

Signed-off-by: Daniel Kahn Gillmor <>
21 months agogmime-cleanup: use GMime 3.0 data types
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:43 +0000 (09:19 -0400)]
gmime-cleanup: use GMime 3.0 data types

Signed-off-by: Daniel Kahn Gillmor <>
21 months agogmime-cleanup: drop unused gmime #defines and simplify g_mime_init ()
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:42 +0000 (09:19 -0400)]
gmime-cleanup: drop unused gmime #defines and simplify g_mime_init ()

Several of these #defines were not actually used in the notmuch
codebase any longer.  And as of GMime 3.0, g_mime_init takes no
arguments, so we can also drop the bogus RFC2047 argument that we were
passing and then #defining away.

signed-off-by: Daniel Kahn Gillmor <>

21 months agogmime-cleanup: drop all arguments unused in GMime 3
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:41 +0000 (09:19 -0400)]
gmime-cleanup: drop all arguments unused in GMime 3

This means dropping GMimeCryptoContext and notmuch_config arguments.

All the argument changes are to internal functions, so this is not an
API or ABI break.

We also get to drop the #define for g_mime_3_unused.

signed-off-by: Daniel Kahn Gillmor <>

21 months agogmime-cleanup: drop g_mime_2_6_unref
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:40 +0000 (09:19 -0400)]
gmime-cleanup: drop g_mime_2_6_unref

signed-off-by: Daniel Kahn Gillmor <>

21 months agogmime-cleanup: simplify
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:39 +0000 (09:19 -0400)]
gmime-cleanup: simplify

GMime 3.0 and later can handle User ID as expected.

signed-off-by: Daniel Kahn Gillmor <>

21 months agogmime-cleanup: tests should only care about gmime 3
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:38 +0000 (09:19 -0400)]
gmime-cleanup: tests should only care about gmime 3

note that "notmuch-show for message with invalid From" is still broken
in  It would be good to debug what's going on there and
try to get it fixed!

signed-off-by: Daniel Kahn Gillmor <>

21 months agogmime-cleanup: always support session keys
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:37 +0000 (09:19 -0400)]
gmime-cleanup: always support session keys

Our minimum version of GMime 3.0 always supports good session key

signed-off-by: Daniel Kahn Gillmor <>

21 months agogmime-cleanup: remove obsolete gpg_path configuration option and crypto contexts
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:36 +0000 (09:19 -0400)]
gmime-cleanup: remove obsolete gpg_path configuration option and crypto contexts

Note that we do keep ignoring the gpg_path configuration option,
though, to avoid breakage of existing installations.  It is ignored
like any other unknown configuration option, but we at least document
that it is ignored so that people who find it in their legacy configs
can know that it's safe to drop.

signed-off-by: Daniel Kahn Gillmor <>

21 months agogmime-cleanup: remove GMime 2.6 variant codeblocks
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:35 +0000 (09:19 -0400)]
gmime-cleanup: remove GMime 2.6 variant codeblocks

signed-off-by: Daniel Kahn Gillmor <>

21 months agogmime-cleanup: drop unused gmime 2.6 content_type from _index_encrypted_mime_part
Daniel Kahn Gillmor [Thu, 2 May 2019 13:19:34 +0000 (09:19 -0400)]
gmime-cleanup: drop unused gmime 2.6 content_type from _index_encrypted_mime_part

In _index_mime_part, we don't need to extract the content-type from
the part until just before we use it, so we also defer it lazily.

Signed-off-by: Daniel Kahn Gillmor <>
21 months agobuild: drop support for gmime-2.6
David Bremner [Thu, 2 May 2019 13:19:33 +0000 (09:19 -0400)]
build: drop support for gmime-2.6

GMime 3.0 is over 2 years old now, and 2.6 has been deprecated in
notmuch for about 1.5 years.

Comments and documentation no longer need to refer to GMime 2.6, so
clean them all up.

Signed-off-by: Daniel Kahn Gillmor <>
22 months agoemacs: Make first documentation line distinct for "a" and "x" commands.
Örjan Ekeberg [Fri, 5 Apr 2019 15:35:50 +0000 (17:35 +0200)]
emacs: Make first documentation line distinct for "a" and "x" commands.

Since only the first line of the documentation is shown by the
help command, it is confusing when "x" and "a" seem to have the same
binding in show-mode.  This commit makes the two function documentations
first lines different and (hopefully) clearer.

22 months agocrypto: Avoid pretending to verify signatures on unsigned encrypted mail
Daniel Kahn Gillmor [Sat, 20 Apr 2019 17:02:57 +0000 (13:02 -0400)]
crypto: Avoid pretending to verify signatures on unsigned encrypted mail

Unsigned encrypted mail shows up with a weird empty signature list.
If we successfully decrypted and there was no signature in it, we
should just not show a sigstatus at all.

The documentation for g_mime_decrypt_result_get_signatures says:

    a GMimeSignatureList or NULL if the stream was not signed.

22 months agocli/show: pass the siglist directly to the sigstatus sprinter
Daniel Kahn Gillmor [Sat, 20 Apr 2019 17:51:39 +0000 (13:51 -0400)]
cli/show: pass the siglist directly to the sigstatus sprinter

This makes it easier to reuse format_part_sigstatus_sprinter() when we
have other places that we want to display a signature status.

22 months agotests: move FINGERPRINT definition to add_gnupg_home
Daniel Kahn Gillmor [Sat, 20 Apr 2019 17:40:39 +0000 (13:40 -0400)]
tests: move FINGERPRINT definition to add_gnupg_home

If a test has added a GnuPG homedir, it may well want to know the
fingerprint.  This saves us from having to redefine this magic string
in multiple places when more tests eventually use the GnuPG homedir.

22 months agopython: support relative path in default database
Doan Tran Cong Danh [Fri, 19 Apr 2019 03:56:59 +0000 (10:56 +0700)]
python: support relative path in default database

From notmuch 0.28, notmuch support relative database path in
notmuch-config(1), but python binding haven't taught this yet.

afew denied to work with a perfectly fine notmuch-config due to this.

22 months agoemacs: Add missing type and group to defcustom variable
Örjan Ekeberg [Mon, 15 Apr 2019 13:35:19 +0000 (15:35 +0200)]
emacs: Add missing type and group to defcustom variable

Added the type 'regexp and group 'notmuch-send as properties to the
customizable variable notmuch-mua-attachment-regexp.

22 months agodoc: exclude notmuch-emacs.rst if emacs is not present.
David Bremner [Sun, 21 Apr 2019 23:41:34 +0000 (20:41 -0300)]
doc: exclude notmuch-emacs.rst if emacs is not present.

This will still generate a warning about an excluded document in the
toctree, but it cuts down on the noise quite a lot.

22 months agobuild: only try to build .rsti files if we have emacs and sphinx
David Bremner [Sun, 21 Apr 2019 23:36:43 +0000 (20:36 -0300)]
build: only try to build .rsti files if we have emacs and sphinx

Emacs is needed to build them, and sphinx is needed to use them

22 months agobuild: ignore *.stamp
David Bremner [Sun, 21 Apr 2019 17:10:18 +0000 (14:10 -0300)]
build: ignore *.stamp

The current case is docstring.stamp, but it's likely that others will

22 months agodoc: use stamp file for html docs
David Bremner [Sun, 21 Apr 2019 17:00:18 +0000 (14:00 -0300)]
doc: use stamp file for html docs

These are less time consuming than the texi docs to rebuild (because
the texi rebuild triggers info rebuild), but still take noticable time.

22 months agodoc: use stamp file to control rebuilding texi
David Bremner [Sun, 21 Apr 2019 16:53:03 +0000 (13:53 -0300)]
doc: use stamp file to control rebuilding texi

Apparently the sphinx-doc texinfo builder is not smart enough to only
rebuild those files where the source has changed.

22 months agoCLI/reindex: fix memory leak
David Bremner [Tue, 16 Apr 2019 01:46:15 +0000 (22:46 -0300)]
CLI/reindex: fix memory leak

Since message is owned by messages, it was held for the entire run of
the program. This in turn means that the Xapian::Document objects are
not freed, and thus one ends up with (effectively) a copy of one's
entire mailstore in memory when running

       notmuch reindex '*'

Thanks to Olly Betts for the patient help debugging, and the
suggestion of a fix.

22 months agolib: add 'body:' field, stop indexing headers twice.
David Bremner [Tue, 19 Mar 2019 00:39:21 +0000 (21:39 -0300)]
lib: add 'body:' field, stop indexing headers twice.

The new `body:` field (in Xapian terms) or prefix (in slightly
sloppier notmuch) terms allows matching terms that occur only in the

Unprefixed query terms should continue to match anywhere (header or
body) in the message.

This follows a suggestion of Olly Betts to use the facility (since
Xapian 1.0.4) to add the same field with multiple prefixes. The double
indexing of previous versions is thus replaced with a query time
expension of unprefixed query terms to the various prefixed

Reindexing will be needed for 'body:' searches to work correctly;
otherwise they will also match messages where the term occur in
headers (demonstrated by the new tests in

22 months agoNEWS: deprecate Emacs 24
David Bremner [Thu, 28 Mar 2019 11:31:03 +0000 (08:31 -0300)]
NEWS: deprecate Emacs 24

22 months agotest: add test for checking forwarded messages
Örjan Ekeberg [Fri, 12 Apr 2019 12:01:13 +0000 (14:01 +0200)]
test: add test for checking forwarded messages

Add test of forwarding messages from within emacs.
The first test checks that a references header is properly
added to the new message.  The second test checks that the
send-hook of the forwarding message adds a forwarded-tag
to the original message.

22 months agoemacs: Tag forwarded messages with +forwarded (customizable)
Örjan Ekeberg [Fri, 12 Apr 2019 12:01:12 +0000 (14:01 +0200)]
emacs: Tag forwarded messages with +forwarded (customizable)

Use the buffer-local variable notmuch-message-queued-tag-changes
to change tags when the forwarding message is sent.

22 months agoemacs: Use a buffer-local variable to update tags when sending replies
Örjan Ekeberg [Fri, 12 Apr 2019 12:01:11 +0000 (14:01 +0200)]
emacs: Use a buffer-local variable to update tags when sending replies

Instead of relying on the "In-Reply-To" header, use a buffer-local variable,
notmuch-message-queued-tag-changes, to add and remove tags to affected
messages when the message-send-hook is triggered.

22 months agoemacs: Add References header to forwarded messages
Örjan Ekeberg [Fri, 12 Apr 2019 12:01:10 +0000 (14:01 +0200)]
emacs: Add References header to forwarded messages

Include the message-id of forwarded messages in the new message.
This ensures that the new (forwarding) message is linked to the
same thread as the message being forwarded.

22 months agotravis: add xapian-backports PPA
David Bremner [Sun, 14 Apr 2019 01:28:45 +0000 (22:28 -0300)]
travis: add xapian-backports PPA

We really want to be testing with a more current version of xapian
than that available in Ubuntu Xenial

22 months agoperformance-tests: tests for renamed/copied files in notmuch new
David Bremner [Mon, 1 Apr 2019 10:31:51 +0000 (07:31 -0300)]
performance-tests: tests for renamed/copied files in notmuch new

Several people have observed that this is surprisingly slow, and we
have a proposal to add tagging into this code path, so we want to make
sure it doesn't imply too much of a performance hit.

23 months agoemacs: make editing a message as new include FCC
Léo Gaspard [Mon, 22 Oct 2018 14:44:54 +0000 (23:44 +0900)]
emacs: make editing a message as new include FCC

This changes the meaning of `e` for non-drafts to make it behave
similarly to new messages, which here means add the `FCC` header.

23 months agoFix notmuch-describe-key
Yang Sheng [Sun, 3 Mar 2019 04:35:33 +0000 (23:35 -0500)]
Fix notmuch-describe-key

Fix notmuch-describe-key crashing for the following two cases
1. format-kbd-macro cannot deal with keys like [(32 . 126)], switch to
use key-description instead.
2. if a function in the current keymap is not bounded, it will crash
the whole process. We check if it is bounded and silently skip it to
avoid crashing.

23 months agolib: update commentary about path/folder terms
David Bremner [Wed, 13 Mar 2019 00:47:11 +0000 (21:47 -0300)]
lib: update commentary about path/folder terms

We missed this when we changed to binary fields.

23 months agolib: add clarification about the use of "prefix" in the docs.
David Bremner [Wed, 13 Mar 2019 00:47:10 +0000 (21:47 -0300)]
lib: add clarification about the use of "prefix" in the docs.

23 months agolib: drop comment about only indexing one file.
David Bremner [Wed, 13 Mar 2019 00:47:09 +0000 (21:47 -0300)]
lib: drop comment about only indexing one file.

Although the situation is complicated by the value fields (which are
taken from a single file), this comment is now more false than true.

23 months agodoc: document notmuch new --verbose
Michal Sojka [Fri, 29 Mar 2019 09:48:17 +0000 (10:48 +0100)]
doc: document notmuch new --verbose

23 months agoperformance-test: fix copy-paste error in test description
David Bremner [Fri, 29 Mar 2019 11:26:47 +0000 (08:26 -0300)]
performance-test: fix copy-paste error in test description

23 months agopython: fix set_sort/add_tag_exclude restype/argtypes typos
hydrargyrum [Sat, 30 Mar 2019 09:31:58 +0000 (10:31 +0100)]
python: fix set_sort/add_tag_exclude restype/argtypes typos

23 months agotest: Add emacs attachment check tests.
David Edmondson [Sat, 8 Sep 2018 21:40:41 +0000 (22:40 +0100)]
test: Add emacs attachment check tests.

23 months agoemacs: Optionally check for missing attachments in outgoing messages
David Edmondson [Sat, 8 Sep 2018 21:40:40 +0000 (22:40 +0100)]
emacs: Optionally check for missing attachments in outgoing messages

Query the user if the message text indicates that an attachment is
expected but no MML referencing an attachment is found.

This is not enabled by default - see the documentation for

23 months agolib: use phrase search for anything not ending in '*'
David Bremner [Sun, 30 Sep 2018 16:27:55 +0000 (13:27 -0300)]
lib: use phrase search for anything not ending in '*'

Anything that does not look like a wildcard should be safe to
quote. This should fix the problem searching for xapian keywords.

23 months agotest: add two known broken tests searching for xapian keywords
David Bremner [Sun, 30 Sep 2018 16:27:54 +0000 (13:27 -0300)]
test: add two known broken tests searching for xapian keywords

Thanks to plujon for pointing out this problem on IRC. The underlying
issue is that the quotes are stripped before the field processors get
the query string, and the heuristic for putting them back is not quite

23 months agoemacs: Easy access to URLs mentioned in the current message
David Edmondson [Thu, 8 Nov 2018 10:45:08 +0000 (10:45 +0000)]
emacs: Easy access to URLs mentioned in the current message

Add a new binding when looking at messages, B, that prompts with a
list of URLs found in the current message, if any. Open the one that
is selected in a browser.

amended by db: s/--browse-urls/-browse-urls/

23 months agorelease: use xz compression
David Bremner [Tue, 19 Mar 2019 10:08:19 +0000 (07:08 -0300)]
release: use xz compression

This produces tarballs that are roughly 30% smaller.

23 months agobuild: Rename GPG_FILE to DETACHED_SIG_FILE
Daniel Kahn Gillmor [Sat, 23 Mar 2019 12:35:44 +0000 (13:35 +0100)]

This is just a semantic cleanup -- we have multiple files that are
OpenPGP signatures.  And while we're probably making signatures with
GnuPG, they can be verified with any OpenPGP implementation, so "GPG_"
is arguably both not specific enough, and overly-specific.

Signed-off-by: Daniel Kahn Gillmor <>
23 months agobuild: distribute signed sha256sums
Daniel Kahn Gillmor [Sat, 23 Mar 2019 12:35:43 +0000 (13:35 +0100)]
build: distribute signed sha256sums

Distribute clearsigned sha256sum file in addition to the detached

Verifies that use the sha256sum ensure that the thing signed includes
the name of the tarball. This defends the verifier by default against
a freeze, rollback, or project substitution attack.

A verifier can use something like the following (as expressed in

      set -o pipefail
      gpgv --keyring ./notmuch-signers.pgp --output - notmuch-$VERSION.tar.gz.sha256.asc | sha256sum -c -

See and other messages in that
thread for discussion.

Signed-off-by: Daniel Kahn Gillmor <>
23 months agobuild: ensure that SHA256_FILE is built
Daniel Kahn Gillmor [Sat, 23 Mar 2019 12:35:42 +0000 (13:35 +0100)]
build: ensure that SHA256_FILE is built

The SHA256_FILE used to be built automatically because of the makefile

Since b8a8dbed91d16299a8768646fb6f18181f31ec40, it isn't getting made
properly, so the release target would fail.

Signed-off-by: Daniel Kahn Gillmor <>
23 months agodoc: Clean up warnings when building notmuch-emacs docs
Daniel Kahn Gillmor [Sat, 23 Mar 2019 12:51:03 +0000 (13:51 +0100)]
doc: Clean up warnings when building notmuch-emacs docs

Without this change, we see this during the build:

    sphinx-build -b html -d doc/_build/doctrees -q ./doc doc/_build/html
    …/doc/notmuch-emacs.rst:67: WARNING: Unexpected indentation.
    …/doc/notmuch-emacs.rst:165: WARNING: Unexpected indentation.
    …/doc/notmuch-emacs.rst:306: WARNING: Unexpected indentation.

This source change doesn't seem to have any effect on the generated
HTML, at least.

Signed-off-by: Daniel Kahn Gillmor <>
23 months agodoc/build: use $(MAKE) instead of make
David Bremner [Tue, 19 Mar 2019 23:50:28 +0000 (20:50 -0300)]
doc/build: use $(MAKE) instead of make

This should silence some warnings about the jobserver, but also make
it easier to build the docs where GNU make is called something other
than make.

Based on a patch from aidecoe.

23 months agoAdd a configure flag to disable rpaths
Luis Ressel [Tue, 26 Feb 2019 02:06:49 +0000 (03:06 +0100)]
Add a configure flag to disable rpaths

Better support build environments where our /sbin/ldconfig based
heuristic does not work (e.g. some musl libc based systems).

23 months agobuild: sign tarball instead of sha256sum
David Bremner [Wed, 13 Feb 2019 02:17:03 +0000 (22:17 -0400)]
build: sign tarball instead of sha256sum

Adam Majer pointed out in [1] the way were signing releases was
unusual. Neither Carl nor I could think of a good reason for
explicitely signing the checksum (internally of course that's what GPG
is going anyway).


23 months agoutil: make remaining headers includable from C++
David Bremner [Sat, 2 Mar 2019 20:26:06 +0000 (16:26 -0400)]
util: make remaining headers includable from C++

libnotmuch_util.a is supposed to be usable from the library and the
CLI, but much the library is compiled as C++. Add in appropriate
wrapping to prevent symbol mangling. These wrappers already existed in
string-util.h; it seems better to be consistent.

23 months agoPrepend regerror() messages with "regexp error: "
Luis Ressel [Mon, 11 Mar 2019 17:14:49 +0000 (18:14 +0100)]
Prepend regerror() messages with "regexp error: "

The exact error messages returned by regerror() aren't standardized;
relying on them isn't portable. Thus, add a a prefix to make clear that
the subsequent message is a regexp parsing error, and only look for this
prefix in the test suite, ignoring the rest of the message.

23 months agotest/T030-config: Separate stdout and stderr output
Luis Ressel [Mon, 11 Mar 2019 17:14:48 +0000 (18:14 +0100)]
test/T030-config: Separate stdout and stderr output

POSIX doesn't specify the flushing behaviour of the STDOUT stream, so
it's invalid to assume a particular order between the stdout and stderr
output. The current test breaks on musl due to this.

23 months agoMerge branch 'release'
David Bremner [Wed, 6 Mar 2019 13:30:07 +0000 (09:30 -0400)]
Merge branch 'release'

23 months agotravis: switch to xenial build env
David Bremner [Wed, 6 Mar 2019 13:18:32 +0000 (09:18 -0400)]
travis: switch to xenial build env

In principle we'd like everything to work with ancient versions. In
practice someone needs drive that effort.

23 months agoMerge branch 'release'
David Bremner [Wed, 6 Mar 2019 12:53:26 +0000 (08:53 -0400)]
Merge branch 'release'

Changes from 0.28.3

23 months agoDeclare fast forward from 0.28.2-1 archive/debian/0.28.3-1 debian/0.28.3-1
David Bremner [Tue, 5 Mar 2019 19:39:09 +0000 (15:39 -0400)]
Declare fast forward from 0.28.2-1

[dgit --overwrite]

23 months agodebian: changelog stanza for 0.28.3-1 0.28.3
David Bremner [Tue, 5 Mar 2019 19:40:15 +0000 (15:40 -0400)]
debian: changelog stanza for 0.28.3-1

23 months agoNEWS for 0.28.3
David Bremner [Tue, 5 Mar 2019 19:36:43 +0000 (15:36 -0400)]
NEWS for 0.28.3

23 months agobump version to 0.28.3
David Bremner [Tue, 5 Mar 2019 19:30:52 +0000 (15:30 -0400)]
bump version to 0.28.3

23 months agodoc: sequentialize calls to sphinx-build
David Bremner [Sun, 3 Mar 2019 03:30:59 +0000 (23:30 -0400)]
doc: sequentialize calls to sphinx-build

In certain conditions the parallel calls to sphinx-build could
collide, yielding a crash like

Exception occurred:
  File "/usr/lib/python3/dist-packages/sphinx/", line 1261, in get_doctree
    doctree = pickle.load(f)
EOFError: Ran out of input

23 months agolib/string_map: fix return type of string_cmp
David Bremner [Sat, 2 Mar 2019 18:10:51 +0000 (14:10 -0400)]
lib/string_map: fix return type of string_cmp

I can't figure out how checking the sign of a bool ever worked. The
following program demonstrates the problem (i.e. for me it prints 1).

 #include <stdio.h>
 #include <stdbool.h>
 int main(int argc, char **argv) {
    bool x;
    x = -1;
    printf("x = %d\n", x);

This seems to be mandated by the C99 standard

23 months agolib: Add known broken test for string_map binary search.
David Bremner [Tue, 5 Mar 2019 18:56:29 +0000 (14:56 -0400)]
lib: Add known broken test for string_map binary search.

Because the string_map functions are not exported, we test via message

2 years agopython: fix get_property error when property doesn't exist
Vincent A [Sun, 27 Jan 2019 08:40:17 +0000 (09:40 +0100)]
python: fix get_property error when property doesn't exist

In Python bindings, Message.get_property fails with an AttributeError when trying to fetch a property that doesn't exist.

From d712832ba982085975c27b23bb502af82e638b39 Mon Sep 17 00:00:00 2001
From: hydrargyrum <>
Date: Sun, 6 Jan 2019 16:08:55 +0100
Subject: [PATCH] python: fix get_property error when property doesn't exist

2 years agoEmacs: bind "g" to 'notuch-refresh-this-buffer
Matt Armstrong [Sat, 16 Feb 2019 20:27:30 +0000 (12:27 -0800)]
Emacs: bind "g" to 'notuch-refresh-this-buffer

Using "g" for refresh operations is a pretty common Emacs convention,
codified by `special-mode' in simple.el.

2 years agoMerge tag '0.28.2'
David Bremner [Sun, 17 Feb 2019 21:08:12 +0000 (17:08 -0400)]
Merge tag '0.28.2'

notmuch 0.28.2 release

2 years agobump version 0.28.2 debian/0.28.2-1
David Bremner [Sun, 17 Feb 2019 11:32:59 +0000 (07:32 -0400)]
bump version

2 years agodebian: changelog for 0.28.2-1
David Bremner [Sun, 17 Feb 2019 11:31:16 +0000 (07:31 -0400)]
debian: changelog for 0.28.2-1

2 years agoNEWS for 0.28.2
David Bremner [Sun, 17 Feb 2019 11:28:15 +0000 (07:28 -0400)]
NEWS for 0.28.2

2 years agoRecord notmuch (0.28.2-1) in archive suite sid
David Bremner [Sun, 17 Feb 2019 11:30:33 +0000 (07:30 -0400)]
Record notmuch (0.28.2-1) in archive suite sid

2 years agonotmuch (0.28.2-1) unstable; urgency=medium
David Bremner [Sun, 17 Feb 2019 11:30:33 +0000 (07:30 -0400)]
notmuch (0.28.2-1) unstable; urgency=medium

  * [notmuch-emacs] Invoke gpg from with --batch and --no-tty

[dgit import unpatched notmuch 0.28.2-1]

2 years agoImport notmuch_0.28.2.orig.tar.gz
David Bremner [Sun, 17 Feb 2019 11:30:33 +0000 (07:30 -0400)]
Import notmuch_0.28.2.orig.tar.gz

[dgit import orig notmuch_0.28.2.orig.tar.gz]

2 years agoImport notmuch_0.28.2-1.debian.tar.xz
David Bremner [Sun, 17 Feb 2019 11:30:33 +0000 (07:30 -0400)]
Import notmuch_0.28.2-1.debian.tar.xz

[dgit import tarball notmuch 0.28.2-1 notmuch_0.28.2-1.debian.tar.xz]

2 years agopython: fix threads.__str__ automethod documentation
Jani Nikula [Mon, 11 Feb 2019 18:22:37 +0000 (20:22 +0200)]
python: fix threads.__str__ automethod documentation

Indent the directive properly to attach it to Threads autoclass


WARNING: don't know which module to import for autodocumenting
'__str__' (try placing a "module" or "currentmodule" directive in the
document, or giving an explicit module name)

2 years agopython: fix documentation title underline
Jani Nikula [Mon, 11 Feb 2019 18:22:36 +0000 (20:22 +0200)]
python: fix documentation title underline

Fix documentation build sphinx warning:

filesystem.rst:18: WARNING: Title underline too short.

2 years agopython: fix documentation build with python 3.7
Jani Nikula [Mon, 11 Feb 2019 18:22:35 +0000 (20:22 +0200)]
python: fix documentation build with python 3.7

The simplistic mocking in falls short on python 3.7. Just use
unittest.mock instead.


Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/", line 368, in eval_config_file
    execfile_(filename, namespace)
  File "/usr/lib/python3/dist-packages/sphinx/util/", line 150, in execfile_
    exec_(code, _globals)
  File "/path/to/notmuch/bindings/python/docs/source/", line 39, in <module>
    from notmuch import __VERSION__,__AUTHOR__
  File "/path/to/notmuch/bindings/python/notmuch/", line 54, in <module>
    from .database import Database
  File "/path/to/notmuch/bindings/python/notmuch/", line 25, in <module>
    from .globals import (
  File "/path/to/notmuch/bindings/python/notmuch/", line 48, in <module>
    class NotmuchDatabaseS(Structure):
TypeError: __mro_entries__ must return a tuple

2 years agoMerge branch 'release'
David Bremner [Sun, 10 Feb 2019 13:47:47 +0000 (09:47 -0400)]
Merge branch 'release'

2 years agoemacs: Invoke gpg with --batch and --no-tty
Daniel Kahn Gillmor [Sat, 9 Feb 2019 17:34:37 +0000 (12:34 -0500)]
emacs: Invoke gpg with --batch and --no-tty

When invoking gpg as a backgrounded tool, it's important to let gpg
know that it is backgrounded, to avoid spurious prompts or other

In particular, was a regression in
GnuPG which causes problems when importing keys without a terminal,
but gpg expects one.

Ensuring that notmuch-emacs always invokes gpg as a background process
should avoid some of these unnecessary failure.

Thanks to Justus Winter for finding this problem.

Signed-off-by: Daniel Kahn Gillmor <>
2 years agoMerge tag '0.28.1'
David Bremner [Fri, 1 Feb 2019 12:35:20 +0000 (08:35 -0400)]
Merge tag '0.28.1'

notmuch 0.28.1 release

2 years agobump copyright year 0.28.1 archive/debian/0.28.1-1 debian/0.28.1-1
David Bremner [Fri, 1 Feb 2019 12:08:13 +0000 (08:08 -0400)]
bump copyright year

2 years agoupdate version to 0.28.1
David Bremner [Fri, 1 Feb 2019 12:06:38 +0000 (08:06 -0400)]
update version to 0.28.1

2 years agochangelog for 0.28.1-1
David Bremner [Fri, 1 Feb 2019 12:05:42 +0000 (08:05 -0400)]
changelog for 0.28.1-1

2 years agoNEWS for bash related configuration change
David Bremner [Fri, 1 Feb 2019 12:03:14 +0000 (08:03 -0400)]
NEWS for bash related configuration change

2 years agoDebian: use new variable to force bash location
David Bremner [Thu, 17 Jan 2019 02:11:32 +0000 (22:11 -0400)]
Debian: use new variable to force bash location

This should no longer be needed on the official debian autobuilders,
but it might help others with merged /usr build environments.

2 years agoconfigure: don't use special variable BASH
David Bremner [Thu, 17 Jan 2019 02:11:31 +0000 (22:11 -0400)]
configure: don't use special variable BASH

bash, in it's wisdom, sets that variable when invoked as /bin/sh, but
then doesn't act as bash, at least not to the degree we need to run