Commit graph

5514 commits

Author SHA1 Message Date
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
David Bremner
bd29098e47 test: make T640 compatible with old C compilers
Apparently our test system does not use the same flags for compiling
tests as it does for compiling notmuch. Make the test compatible with
C89. Also remove one unused loop index.
2017-02-26 08:16:45 -04:00
Jani Nikula
c7df0cca9e completion: add bash completion for query: and property:
Add prefix completion for query and property, with value completion
for query. Apparently there's no way to get at the available
properties in the cli.
2017-02-26 07:57:42 -04:00
Mark Walters
df483ed4bd emacs: show: stop display of application/* parts
Gnus seems to display application/zip and application/tar by
default. This doesn't seem desirable so we override it.

We only override if the user has not customized
mm-inline-override-types themselves.
2017-02-26 07:55:00 -04:00
Jani Nikula
75bb23f748 test: test format version difference between v2 and v3
Schemata v3 changed message filename field to a list. Test both
versions 2 and 3.
2017-02-26 07:42:02 -04:00
Jani Nikula
14c60cf168 cli/show: list all filenames of a message in the formatted output
Instead of just having the first filename for the message, list all
duplicate filenames of the message as a list in the formatted
outputs. This bumps the format version to 3.
2017-02-26 07:41:33 -04:00
Jani Nikula
524372de10 emacs: use (system-name) instead of system-name
Fix the deprecation warning:

In notmuch-maildir-fcc-make-uniq-maildir-id:
emacs/notmuch-maildir-fcc.el:279:53:Warning: ‘system-name’ is an obsolete
    variable (as of 25.1); use (system-name) instead

I've used (system-name) since at least 2011, so it must have been
around quite a while.
2017-02-26 07:37:01 -04:00
David Bremner
7bd63833bf lib/message.cc: use view number to invalidate cached metadata
Currently the view number is incremented by notmuch_database_reopen
2017-02-25 21:15:38 -04:00
David Bremner
e0b22c139c lib: handle DatabaseModifiedError in _n_message_ensure_metadata
The retries are hardcoded to a small number, and error handling aborts
than propagating errors from notmuch_database_reopen. These are both
somewhat justified by the assumption that most things that can go
wrong in Xapian::Database::reopen are rare and fatal. Here's the brief
discussion with Xapian upstream:

   24-02-2017 08:12:57 < bremner> any intuition about how likely
      Xapian::Database::reopen is to fail? I'm catching a
      DatabaseModifiedError somewhere where handling any further errors is
      tricky, and wondering about treating a failed reopen as as "the
      impossible happened, stopping"

   24-02-2017 16:22:34 < olly> bremner: there should not be much scope for
    failure - stuff like out of memory or disk errors, which are probably a
    good enough excuse to stop
2017-02-25 21:13:50 -04:00
David Bremner
e17a914b77 lib: add _notmuch_database_reopen
The main expected use is to recover from a Xapian::DatabaseChanged
exception.
2017-02-25 21:09:17 -04:00
David Bremner
ae731c183a test: add known broken test for uncaught DatabaseModifiedError
There are several of these to track down, but one that is in quite a
few code paths is _notmuch_message_ensure_metadata.
2017-02-25 21:07:18 -04:00
David Bremner
b1a42b5916 debian: note read-after-free fix in d/changelog 2017-02-25 08:48:10 -04:00
David Bremner
4191ab22e0 NEWS: document read-after-free bugfix 2017-02-25 08:45:43 -04:00