notmuch
16 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 <dkg@fifthhorseman.net>
16 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 <dkg@fifthhorseman.net>
16 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 <dkg@fifthhorseman.net>

16 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 <dkg@fifthhorseman.net>

16 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 <dkg@fifthhorseman.net>

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

GMime 3.0 and later can handle User ID as expected.

signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

16 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 T310-emacs.sh.  It would be good to debug what's going on there and
try to get it fixed!

signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

16 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
handling.

signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

16 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 <dkg@fifthhorseman.net>

16 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 <dkg@fifthhorseman.net>

16 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 <dkg@fifthhorseman.net>
16 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 <dkg@fifthhorseman.net>
17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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

17 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
arise.

17 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.

17 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.

17 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.

17 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
body.

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
equivalent.

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 T530-upgrade.sh)

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

17 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.

17 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.

17 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.

17 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.

17 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

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

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

17 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

17 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

18 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.

18 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
`notmuch-mua-attachment-check'.

18 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.

18 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
right.

18 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/

18 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.

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

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 <dkg@fifthhorseman.net>
18 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
signature.

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
bash):

      set -o pipefail
      wget https://notmuchmail.org/releases/notmuch-$VERSION.tar.gz{,.sha256.asc}
      gpgv --keyring ./notmuch-signers.pgp --output - notmuch-$VERSION.tar.gz.sha256.asc | sha256sum -c -

See id:87r2b8w956.fsf@fifthhorseman.net and other messages in that
thread for discussion.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
18 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
dependencies.

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

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
18 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 <dkg@fifthhorseman.net>
18 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.

18 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).

18 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).

[1] mid:b3fd556d-c346-7af9-a7a2-13b0f3235071@suse.de

18 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.

18 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.

18 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.

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

18 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.

18 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

18 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]

18 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

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

18 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

18 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/environment.py", line 1261, in get_doctree
    doctree = pickle.load(f)
EOFError: Ran out of input

18 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 6.3.1.2.

18 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
properties.

19 months 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 <dev@indigo.re>
Date: Sun, 6 Jan 2019 16:08:55 +0100
Subject: [PATCH] python: fix get_property error when property doesn't exist

19 months 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.

19 months 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

19 months 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

19 months 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

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

19 months 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

19 months 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]

19 months 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]

19 months 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]

19 months 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
documentation.

Fixes:

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)

19 months 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.

19 months 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 conf.py falls short on python 3.7. Just use
unittest.mock instead.

Fixes:

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

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

19 months 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
breakage.

In particular, https://bugs.debian.org/913614 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 <dkg@fifthhorseman.net>
19 months 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

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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.

19 months 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
scripts.

19 months agoemacs: use ".ps" suffix for PostScript temporary files.
David Bremner [Wed, 30 Jan 2019 11:15:59 +0000 (07:15 -0400)]
emacs: use ".ps" suffix for PostScript temporary files.

Joerg Jaspert [1] reported problems with evince reading unsuffixed
temporary files in Debian.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920856

19 months agodoc: fix references to search.exclude_tags
Peter Wang [Sun, 27 Jan 2019 06:54:59 +0000 (17:54 +1100)]
doc: fix references to search.exclude_tags

The documentation incorrectly referred to a configuration item
"search.tag_exclude" in some places, instead of "search.exclude_tags".

20 months agoconfigure: check that the version of emacs we may have is at least 24
Tomi Ollila [Wed, 19 Dec 2018 16:59:49 +0000 (18:59 +0200)]
configure: check that the version of emacs we may have is at least 24

This also effectively drops support to Emacs version 23, which was
deprecated in version 0.23.2 (2016-11-20) and did not entirely work
any more.

20 months agodocs: Use correct call to notmuch_query_search_threads in usage example
rhn [Mon, 17 Dec 2018 17:57:48 +0000 (17:57 +0000)]
docs: Use correct call to notmuch_query_search_threads in usage example

Amended by db: simplify (subjectively) the example.

20 months agotest: Check for replies obeying lifetime guarantees
rhn [Mon, 17 Dec 2018 17:57:47 +0000 (17:57 +0000)]
test: Check for replies obeying lifetime guarantees

The test attempts to check that a message coming from a thread outlives its messages list and gets destroyed together with the thread.

20 months agolib: Explicitly state when replies will be destroyed
rhn [Mon, 17 Dec 2018 17:57:46 +0000 (17:57 +0000)]
lib: Explicitly state when replies will be destroyed

Without an explicit guarantee, it's not clear how to use the reference.

21 months agodoc: make man pages depend on emacs docstrings
David Bremner [Thu, 20 Dec 2018 08:30:11 +0000 (17:30 +0900)]
doc: make man pages depend on emacs docstrings

This is nonsensical on the face of it, but is needed (for now) because
the notmuch-emacs page is unconditionally included in index.rst.

21 months agodoc/emacs: document notmuch-cycle-notmuch-buffers
David Bremner [Thu, 14 Jun 2018 00:32:45 +0000 (21:32 -0300)]
doc/emacs: document notmuch-cycle-notmuch-buffers

For some reason I couldn't find this when I searched, so add it to the
manual.

21 months agodoc/emacs: document notmuch-poll*
David Bremner [Thu, 14 Jun 2018 00:32:44 +0000 (21:32 -0300)]
doc/emacs: document notmuch-poll*

The current "documentation" for these variables consists of only the
variable names.

21 months agodoc/emacs: document notmuch-tagging-keys
David Bremner [Thu, 14 Jun 2018 00:32:43 +0000 (21:32 -0300)]
doc/emacs: document notmuch-tagging-keys

Calling these "Global keys" is arguably a bit of a stretch, but they
do work in all notmuch modes except notmuch-hello.

21 months agodoc/emacs: document notmuch-message-headers*
David Bremner [Thu, 14 Jun 2018 00:32:42 +0000 (21:32 -0300)]
doc/emacs: document notmuch-message-headers*

More precisely, copy the docstrings into notmuch-emacs documentation pages.

21 months agodoc/emacs: add documentation for stashing 'c X' bindings
David Bremner [Thu, 14 Jun 2018 00:32:41 +0000 (21:32 -0300)]
doc/emacs: add documentation for stashing 'c X' bindings

This is the first of a series of changes requiring the extracted docstrings.