Commit graph

6976 commits

Author SHA1 Message Date
Jani Nikula
d0cd253b37 test: require test_begin_subtest before test_expect_success
Unify the subtests by requiring test_begin_subtest before
test_expect_success. (Similar change for test_expect_code will
follow.)

This increases clarity in the test scripts by having a separate line
for the start of the subtest with the heading, and makes it possible
to simplify the test infrastructure by making all subtests similar.
2017-03-09 09:01:21 -04:00
Jani Nikula
b8f12bd371 test: drop the implicit prereq check mechanism from test_expect_*
The only place where we use the implicit prereq check is T000-basic.sh
where we check that it works. It's an added complication that we don't
use. Remove it.

The test_have_prereq function can still be used for the same effect in
subtests that use test_begin_subtest. For now, this will make it
impossible to have prereqs in one-line subtests that don't require
test_begin_subtest. This will be fixed in follow-up work.
2017-03-09 09:00:16 -04:00
Jani Nikula
e563b8cafd test: ensure test_begin_subtest has been called before test_expect_*
This is the expectation, increase robustness of the test suite by
requiring it.
2017-03-09 08:58:28 -04:00
Jani Nikula
13a59c4a8f test: only accept short and long options, not silly in-betweens
It's not notmuch style to accept sloppy parameter names.
2017-03-09 08:55:38 -04:00
Jani Nikula
de66230b46 test: remove unused and no-op --long-tests parameter
It's been unused since its introduction in commit 0083854b12 ("Copy
test framework from Git").
2017-03-09 08:55:17 -04:00
Jani Nikula
8af6fc5e6e test: remove unused test_external and test_external_without_stderr
They've been unused since their introduction in commit 0083854b12
("Copy test framework from Git"), only causing maintenance burden.
2017-03-09 08:55:06 -04:00
Jani Nikula
cfc0909511 test: remove unused filter functions
They've been unused since their introduction in commit 0083854b12
("Copy test framework from Git").
2017-03-09 08:54:53 -04:00
Jani Nikula
1db3244bf1 test: remove unused regexp convenience variables
They've been unused since their introduction in commit 0083854b12
("Copy test framework from Git").
2017-03-09 08:53:12 -04:00
Jani Nikula
14c0862bac test: suppress diff for broken test without V=1
Known broken tests are, well, known broken. Do not print the result
diff for them unless V=1 is specified. Now that the test description
is printed also when known broken tests fail, the user can also skip
to running the individual failing tests.
2017-03-09 08:48:08 -04:00
Jani Nikula
740f3296b8 test: print test description also for failing known broken tests
With the test description, the user can see the test script name, and
debug with that alone.
2017-03-09 08:47:57 -04:00
David Bremner
4e872c64e1 Merge branch 'release'
new release candidate, with regexp fix
2017-03-08 08:31:51 -04:00
David Bremner
29958b2b9a debian: changelog stanza for 0.24~rc1-1 2017-03-08 08:10:11 -04:00
David Bremner
15f8fc78c8 version: bump version to 0.24~rc1 2017-03-08 08:04:42 -04:00
Olly Betts
81bd72cebb lib: Fix RegexpPostingSource
Remove incorrect skipping to first match from init(), and add explicit
skip_to() and check() methods to work around xapian-core bug (the
check() method will also improve speed when filtering by one of
these).
2017-03-07 19:44:36 -04:00
David Bremner
8f35cb889a Merge branch 'release'
NEWS and doc changes
2017-03-07 09:12:48 -04:00
Jani Nikula
9208289eea NEWS: notmuch-emacs-mua and desktop integration 2017-03-07 09:09:46 -04:00
Jani Nikula
4f4d9a0a7b NEWS: external subcommand handling 2017-03-07 09:08:39 -04:00
Jani Nikula
02421015fd man: document external subcommand handling in notmuch(1)
The documentation for this was overlooked when adding the subcommand
handling. This seems like the proper place for it.
2017-03-07 09:05:50 -04:00
Mark Walters
9da57ea107 NEWS for emacs 2017-03-07 09:05:20 -04:00
David Bremner
91524d5d6c notmuch 0.24~rc0 release
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAli8qxsACgkQ8gKXHaSn
 niybAAv/VRBy8VbdNw5iJlgj0HIyoLuCQQw9Koba3r5PnLHvuxozIMdYPiyLdzBg
 /Zd1Nwvp+yPSEHciyzwPceW0PsBa+ChdbJBGaZhv1++oXWEPR2t45RGVrImNu5w5
 bd5JuYW63rpYBClKhwRK+8if7sPyeBCs0kK/MgqqWbG7oAEhPDpZ9Vs7GTWGEbqe
 fJyqIJ8687LoM0eLdTYrDHrz8EKrI0UmFKqj+/FpEmgyMga4tSmConop3LjbjW5M
 woKTR8lOQ2Yt72v43bqiCWEF+J3BbeB9ixECKktanUEIfMIoYfrmFvXGxmZD60WF
 BD95Z3YwIkF0jX19omxkGx1KEY4VlNy+BjxGOXX0PvUqYdPPN2hM8uS0SnKz/1NU
 pSb7p6Rw7GNskwAP5+KkghZlVUhEoUcvC1mostB4dMibqnrjeYU7lBQfeR++vht0
 r5jKyh1z6RQBJUINx5IJh6V+OabK/Lsp90uCnFsxXWB6pMTbBX5Zm9CNHHa7UBod
 MpmI7lcv
 =KFBY
 -----END PGP SIGNATURE-----

Merge tag '0.24_rc0'

notmuch 0.24~rc0 release
2017-03-05 20:32:20 -04:00
David Bremner
990f8cd032 debian: add two new exception symbols.
It seems these need to be exported from the library in order for
exception handling to work.
2017-03-05 20:13:06 -04:00
David Bremner
ba1c934e5b NEWS: start NEWS for 0.24 2017-03-05 19:49:31 -04:00
David Bremner
75363cf4ef debian: start changelog stanza for 0.24~rc0-1 2017-03-05 19:33:50 -04:00
David Bremner
08c6731761 version: bump to 0.24~rc0 2017-03-05 19:30:21 -04:00
Jani Nikula
85df8b3915 test: shrink T590-thread-breakage test decription to one line
The test description is used for log output, I think the intention is
to keep it as a one-liner. Leave the rest of the long description as a
comment.
2017-03-04 21:21:11 -04:00
Mark Walters
95e9c137e1 emacs: compat: backport fix for folding long headers when sending
This backports the fix from emacs master (commit
77bbca8c82f6e553c42abbfafca28f55fc995d00) to notmuch-emacs to wrap
long headers.

This fixes the test introduced in the previous changeset.
2017-03-04 21:16:42 -04:00
Mark Walters
a8f91b74e7 Test: emacs: test for folding long headers.
Headers of more than 998 characters should be folded when sending.
However, until recently, emacs did not do this.

This adds a (known broken) test for this when sending messages in
emacs. We will backport the fix to notmuch-emacs in the next
changeset.
2017-03-04 21:15:55 -04:00
David Bremner
dfacfe14f3 lib: query make exclude handling non-destructive
We filter added exclude at add time, rather than modifying the query by
count search. As noted in the comments, there are several ignored
conditions here.
2017-03-04 20:47:25 -04:00
David Bremner
e209b71873 lib: centralize query parsing, store results.
The main goal is to prepare the way for non-destructive (or at least
less destructive) exclude tag handling. It does this by having a
pre-parsed query available for further processing. This also allows us
to provide slightly more precise error messages.
2017-03-04 20:47:25 -04:00
Jani Nikula
f3edc5dc86 lib: use delete[] to free buffer allocated using new[]
Fix warning caught by clang:

lib/regexp-fields.cc:41:2: warning: 'delete' applied to a pointer that was allocated
      with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        delete buffer;
        ^
              []
lib/regexp-fields.cc:37:17: note: allocated with 'new[]' here
        char *buffer = new char[len];
                       ^
2017-03-04 20:42:39 -04:00
David Bremner
6cb1c617a7 lib: add mid: as a synonym for id:
mid: is the url scheme suggested by URL 2392. We also plan to
introduce more flexible searches for mid: than are possible with
id: (in order not to break assumptions about the special behaviour of
id:, e.g. identifying at most one message).
2017-03-03 17:46:48 -04:00
David Bremner
55524bb063 lib: regexp matching in 'subject' and 'from'
the idea is that you can run

% notmuch search subject:/<your-favourite-regexp>/
% notmuch search from:/<your-favourite-regexp>/

or

% notmuch search subject:"your usual phrase search"
% notmuch search from:"usual phrase search"

This feature is only available with recent Xapian, specifically
support for field processors is needed.

It should work with bindings, since it extends the query parser.

This is easy to extend for other value slots, but currently the only
value slots are date, message_id, from, subject, and last_mod. Date is
already searchable;  message_id is left for a followup commit.

This was originally written by Austin Clements, and ported to Xapian
field processors (from Austin's custom query parser) by yours truly.
2017-03-03 17:46:48 -04:00
David Bremner
31b8ce4558 lib: create field processors from prefix table
This is a bit more code than hardcoding the two existing field
processors, but it should make it easy to add more.
2017-03-03 07:15:13 -04:00
David Bremner
914c4db1f2 build: use sha256sum instead of sha1sum to sign releases 2017-03-02 17:31:15 -04:00
Jani Nikula
4f2a7993a5 emacs/desktop: update to use notmuch-emacs-mua and handle mailto
With the mailto: handling in notmuch-emacs-mua, we can update the
desktop file to advertize we can be set as the default application to
handle email. While at it, add GenericName and Comment to be more
informative.

With --hello, notmuch-emacs-mua will run (notmuch) if mailto: url is
not given.
2017-03-01 19:33:52 -04:00
Jani Nikula
97f3d55ad9 completion: complete notmuch emacs-mua
With subcommand handling for external commands we can easily complete
'notmuch emacs-mua' using the existing completion system.
2017-03-01 19:33:33 -04:00
David Bremner
508b5c20fa Merge branch 'release'
Second gnugpg test suite fix
2017-02-28 21:21:07 -04:00
David Bremner
770d00a895 update version to 0.23.7 2017-02-28 20:49:24 -04:00
David Bremner
cab1c36d52 NEWS: add news for 0.23.7 2017-02-28 20:46:53 -04:00
David Bremner
1c9aa39822 add changelog stanza for 0.23.7-1 2017-02-28 20:39:59 -04:00
Tomi Ollila
5c0f1bd367 notmuch-config: ENOENT vs generic handling when file open fails.
When opening configuration file fails, ENOENT (file not found) is
handled specially -- in setup missing file is ok (often expected),
and otherwise user can be informed to run notmuch setup.

In any other case the the reason is unknown, so there is no other
option but to print generic error message to stderr.
2017-02-28 08:08:26 -04:00
Jani Nikula
80aeaf7f59 cli/config: don't try to open config file for 'notmuch help'
The help command does not really need to try to open the config
file. So don't.
2017-02-28 08:08:11 -04:00
David Bremner
5a69aa1474 notmuch 0.23.6 release
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAli0CMcACgkQ8gKXHaSn
 nizKXwv/RUY4IpZVOUItXVh1fFUHvHXFM7UBZKyX1VBpYWx8E4rtFATAiTDtDpfK
 uMvPiTJcHk0r67Tahxv2ruwFVX9IXDT56XmFsQE/36jWqVfrVWq8VRiaC3/xzFQg
 6PoSO/pkUtqlKGNsmWbCpbABp5KaLLxt7r0nM3A9r58N71wsEgoWjxs5+RERSpn2
 ZuMAmw64SFFPITMskEtonsyG8isR13yxZLFouck5UCCiWBud85eS6SLF9fujRYoj
 MWK9MmT3XlAmFM4Lntk60lEx6qAYFfcaohxeJyGhZvQzsAyFnVKhFI8v+9jPLHHy
 po+yLsf2batQrAOcoqzZcV2/TAC/sfvM2PERRc+0Z1J7dtd87NEklXCOMA31JwGL
 HbERDhs51+Vk87QrjUUAocFWvhWAtMs64CtfU1vy6pYvEXqz6zJFb1ZkRQ9b+c5w
 84N/Xga+iXMzV5Ks4ezJqN7D46jmDUi5rM7B73fvuvIwdUOZJC0XRx129shYPieP
 kKZPa4Cp
 =awvd
 -----END PGP SIGNATURE-----

Merge tag '0.23.6'

notmuch 0.23.6 release
2017-02-28 08:06:42 -04:00
Jani Nikula
ea20a932f1 cli/show: add content-disposition to structured output message parts
Help the clients decide how to display parts.

Test updates by Mark Walters <markwalters1009@gmail.com>.
One more test fix by db
2017-02-28 08:03:00 -04:00
Jani Nikula
85caaaf861 cli/show: abstract get content disposition
Reduce duplication in follow-up work. As a side effect, handle error
returns from g_mime_content_disposition_get_disposition() without
segfaulting.
2017-02-28 07:59:00 -04:00
David Bremner
1044775fc0 test: move GNUPGHOME to TEST_TMPDIR
We already use this directory for dtach sockets, so it makes sense to
put gnupg sockets there as well. There doesn't seem to be a clean way
to put a fully functional socket in a different location than
GNUPGHOME.
2017-02-27 20:01:42 -04:00
David Bremner
a4ddc63b23 Revert "configure: add test for gpgconf --create-socketdir"
This reverts commit 12f7d4e61d.

Since we're not using gpgconf anymore, drop the unneeded test in
configure.
2017-02-27 18:27:49 -04:00
David Bremner
5a42bb96c1 Revert "test: use gpgconf --create-socketdir if available"
This reverts commit e7b88e8b0a.

It turns out that this does not work well in environments without a
running systemd (or some other provider of /run/user)
2017-02-27 18:26:47 -04:00
David Bremner
c028ec8860 debian: set upload date and suite 2017-02-27 06:58:07 -04:00
David Bremner
7e565a3db3 NEWS: set release date 2017-02-27 06:57:42 -04:00