Commit graph

4995 commits

Author SHA1 Message Date
Jani Nikula
971cdc72cd test: make it possible to have multiple corpora
We largely use the corpus under test/corpus for
testing. Unfortunately, many of our tests have grown to depend on
having exactly this set of messages, making it hard to add new message
files for testing specific cases.

We do use a lot of add_message from within the tests, but it's not
possible to use that for adding broken messages, and adding several
messages at once can get unwieldy.

Move the basic corpus under tests/corpora/default, and make it
possible to add new, independent corpora along its side. This means
tons of renames with a few tweaks to add_email_corpus function in
test-lib.sh to let tests specify which corpus to use.
2016-09-17 08:39:34 -03:00
Daniel Kahn Gillmor
89c8d27948 clean up spelling 2016-09-12 08:16:35 -03:00
Matt Armstrong
d25d33ff2d emacs: make the remaining faces configurable.
I believe this moves all "anonymous" face specifications in notmuch
code into a configurable defface.
2016-09-12 08:12:10 -03:00
Matt Armstrong
3856286e21 emacs: implement notmuch-search-color-line with dolist.
While passing a lambda to mapc is idiomatic elisp, dolist is easier
to understand, and there are a few other calls to it in this file.
2016-09-12 08:08:45 -03:00
Mark Walters
7b7960ea22 emacs: wash: make word-wrap bound message width
Previously if notmuch-wash-wrap-lines-length was set then all messages
would be wrapped at this value (or window-width if that is
smaller). This was done regardless of the message's depth in a thread --
for example, if the n.w.w.l.l is 80 and the messages depth is 20
(so indented 20 by default) the messages text only got 60 characters
of space.

This commit changes that so a message always gets the full n.w.w.l.l
of width regardless of its indentation (unless that goes over
window-width of course).
2016-09-12 08:06:00 -03:00
Mark Walters
f949215207 emacs: show: let the user override the mime-type of an attachment
This allows the user to override the mime-type of a part in the show
buffer. This takes the simple option of displaying the part with the
specified mime-type in its own buffer (in view mode). This avoids
further complicating the part handling code.

Bound to ". m" (i.e., m in the part map). Then the user can either
enter a mime-type (with completion to all mime types that mailcap (and
thus notmuch) knows about, or press return for the default choice of
text/plain.
2016-09-12 08:03:34 -03:00
Steven Allen
e954310d70 emacs: use define-derived-mode for defining modes.
This sets up and runs all the correct hooks and reduces some redundancy.
2016-09-10 13:07:54 -03:00
David Bremner
07dff49630 Merge branch 'release'
hand fixed conflicts with NEWS
2016-09-08 22:18:37 -03:00
David Bremner
da5029e2ac NEWS: add news for 0.22.2 2016-09-08 20:50:02 -03:00
David Bremner
79b3dda3f3 debian: add changelog stanza for 0.22.2-1 2016-09-08 19:24:10 -03:00
David Bremner
afef676793 version: bump to 0.22.2 2016-09-08 19:05:12 -03:00
David Bremner
7edded2740 test/crypto: hard code fingerprint
Originally the intent was to make the test more robust against changing
test keys. It turns out that (unscientifically) gpg --with-colons output
changes more often than our test key. Rather than making the script more
complex, just hard code the fingerprint.

This fixes Debian bug #847013; I expect similar test failures as other
distros adopt gnupg 2.1.15
2016-09-08 09:08:09 -03:00
Mark Walters
fce8146a8b emacs: maildir: add the actual insert code
With all the preparation it is now simple to add the actual insert
code. Since insert can fail for many reasons we let the user decide
interactively deal with it.

We modify test-lib.el to set file fcc, so that all the old tests and
emacs_fcc_message from test-lib.sh still work
2016-09-04 08:23:14 -03:00
Mark Walters
cf59859b20 Modify our local copy of message-do-fcc
Since we also need to use this code for the draft handling we split
message-do-fcc into convenient sub-chunks (functions or macros as
appropriate).
2016-09-04 08:23:04 -03:00
Mark Walters
aa1e8352de emacs: simplify our local copy of message-do-fcc
message-do-fcc has lots of functionality we don't need, so remove it.
2016-09-04 08:22:56 -03:00
Mark Walters
967bbc0792 emacs: maildir import message-do-fcc
We will need our own local copy of message-do-fcc so this commit just
copies the code straight from message.el so that it is easier to see
our local changes coming in the next commit.
2016-09-04 08:22:48 -03:00
Mark Walters
37859d1fcb emacs: maildir-fcc: prepare for use of notmuch insert
We move some code around in preparation for the use of notmuch
insert. In particular, we move the check for a valid maildir for the
fcc to when the message is sent rather than when the fcc header is
inserted. The main motivation is consistency with the insert version
(coming later) where we cannot check the validity until send.

We allow the user some chance to correct the header; the choice here
is intended to be consistent with the insert version to come.
2016-09-04 08:22:39 -03:00
Mark Walters
74b54fb0fa emacs: notmuch-check-exit-status bugfix
This function prints diagnostic information in the event of an
error. However, one of the callers has an optional :stdin-string
keyword argument. This causes the error printing routine to error
itself.

Rather than reach notmuch-check-exit-status about the possible keyword
arguments (currently only one but could be more in the future) this
commit just tells notmuch-check-exit-status how to print non-string arguments.
2016-09-04 08:22:30 -03:00
Tomi Ollila
e0e6a17675 Makefile.local: use $(wildcard) to check existence of ${srcdir}/.git
With this GNU Make construct one shell invocation can be skipped
and code looks shorter (narrower). This would now match to .git
being other file type than regular file or directory (or symlink
to those), but that is not a use case anyone should expect users
to do.
2016-09-04 08:14:55 -03:00
Tomi Ollila
17341ec798 Makefile.local: make IS_GIT simply expanded
By using ':=' while setting IS_GIT it is expanded to 'yes' or 'no' at
that point (and not every time when $(IS_GIT) is referenced).
2016-09-04 08:14:46 -03:00
Mark Walters
827c28a04e emacs: address: allow internal completion on an individual basis
This commit makes two changes. The first allows the user to override
an external completion method with the internal notmuch address based
completion for an individual buffer.

Secondly, if the user has company-mode enabled then it sets up company
mode (based on internal completion) but disables the automatic timeout
completion -- the user can still activate it in when desired with
standard company commands such as company-complete.
2016-09-04 08:07:59 -03:00
Mark Walters
2cf0ef3998 emacs: address completion, allow sender/recipient and filters
This commit lets the user customize the address completion. It makes
two changes.

The first change controls whether to build the address completion list
based on messages you have sent or you have received (the latter is
much faster).

The second change add a possible filter query to limit the messages
used -- for example, setting this to date:1y..  would limit the
address completions to addresses used in the last year. This speeds up
the address harvest and may also make the search less cluttered as old
addresses may well no longer be valid.
2016-09-04 08:07:46 -03:00
David Bremner
7352cadb4f NEWS: fix go bindings NEWS
Move to correct release. Mention moving to contrib. Drop mention of
formatting fixes, as those are not yet applied.
2016-09-04 08:04:48 -03:00
laochailan
81045d9527 updated NEWS 2016-09-03 20:20:18 -03:00
laochailan
a26b06f09d fixed wrong constant values
before, they were both zero, so getting a read-writeable handle was
impossible.
2016-09-03 20:15:46 -03:00
laochailan
263a690ac4 Added thread bindings to go bindings 2016-09-03 20:15:16 -03:00
David Bremner
b0d03fc5ba bindings: move go bindings to contrib
This signals two things, an intent to be more liberal about accepting
patches, and an intent to stop distributing the bindings if maintenance
doesn't pick up.
2016-09-03 20:13:08 -03:00
David Bremner
2f2df00d43 contrib: remove old copy of vim front end
Having two in the tree is just confusing. And the viml one is even more
out of date than the ruby one.
2016-09-03 20:10:01 -03:00
David Bremner
59fed50a82 lib: update cached mtime in notmuch_directory_set_mtime
Without this change, the following code fails

  notmuch_directory_set_mtime(dir, 12345);
  assert(notmuch_directory_get_mtime(dir) == 12345);
2016-08-23 20:58:46 -03:00
David Bremner
3ba1b938b5 doc: update cross references for notmuch.1
In particular add notmuch-compact(1) (Debian bug #825884)
2016-08-23 20:53:52 -03:00
David Bremner
9e177b236c lib: reword comment about XFOLDER: prefix
I believe the current one is misleading, because in my experiments
Xapian did not add : when prefix and term were both upper case. Indeed,
it's hard to see how it could, because prefixes are added at a layer
above Xapian in our code. See _notmuch_message_add_term for an example.

Also try to explain why this is a good idea.  As far as I can ascertain,
this is more of an issue for a system trying to work with an unknown set
of prefixes. Since notmuch has a fixed set of prefixes, and we can
hopefully be trusted not to add XGOLD and XGOLDEN as prefixes, it is
harder for problems to arise.
2016-08-18 05:11:37 -03:00
David Bremner
98da3c079a debian: changelog stanza for 0.22.1-3 2016-08-14 13:33:25 +09:00
David Bremner
cf8aabdd37 test: make gdb even quieter
gdb sometimes writes warnings to stdout, which we don't need/want, and
for some reason --batch-silent isn't enough to hide. So in this commit
we write them to a log file, which is probably better for debugging
anyway. To see an illustrative test failure before this change, run

% make
% touch notmuch-count.c
% cd test && ./T060-count.sh

(cherry picked from commit f45fa5bdd3)
2016-08-14 13:27:57 +09:00
Daniel Kahn Gillmor
1ba73d1437 Omit User-Agent: header by default
The User-Agent: header can be fun and interesting, but it also leaks
quite a bit of information about the user and their software stack.

This represents a potential security risk (attackers can target the
particular stack) and also an anonymity risk (a user trying to
preserve their anonymity by sending mail from a non-associated account
might reveal quite a lot of information if their choice of mail user
agent is exposed).

This change also avoids hiding the User-Agent header by default, so
that people who decide they want to send it will at least see it (and
can edit it if they want to) before sending.

It makes sense to have safer defaults.
2016-08-11 20:16:00 +09:00
Mikhail
188fccd84f configure: add --without-api-docs option
Add option to explicitly disable API man page build even if doxygen
binary is available. --without-docs also implies not building API
manpage.

This change intended to add more distinctness into build system and
allow user not to build unwanted man pages.
2016-08-11 20:13:46 +09:00
Mark Walters
999d473299 emacs: wash: word-wrap bugfix
Previously notmuch-wash made the width of the text (approximately) the
window-width minus the depth in thread. This is correct for the
default indentation of 1 per message depth, but is incorrect for any
other setting of notmuch-show-indent-messages-width.

As notmuch-show-indent-messages-width is customisable, and notmuch-tree
sets it to zero to avoid indenting messages in the message pane, this
bug can show up in real use.

Two of the tests had to be updated: when
notmuch-show-indent-messages-width is 0, then the new (correct) word
wrapping happens later, when notmuch-show-indent-messages-width is 4,
then the new word wrapping happens sooner.
2016-08-09 09:34:25 +09:00
David Bremner
293186d6c6 lib: provide _notmuch_database_log_append
_notmuch_database_log clears the log buffer each time. Rather than
introducing more complicated semantics about for this function, provide
a second function that does not clear the buffer. This is mainly a
convenience function for callers constructing complex or multi-line log
messages.

The changes to query.cc are to make sure that the common code path of
the new function is tested.
2016-08-09 09:34:11 +09:00
David Bremner
f45fa5bdd3 test: make gdb even quieter
gdb sometimes writes warnings to stdout, which we don't need/want, and
for some reason --batch-silent isn't enough to hide. So in this commit
we write them to a log file, which is probably better for debugging
anyway. To see an illustrative test failure before this change, run

% make
% touch notmuch-count.c
% cd test && ./T060-count.sh
2016-08-09 09:33:59 +09:00
Matt Armstrong
2a7b11b064 emacs: express n-search-line-faces in terms of two new faces
The two new faces (notmuch-search-flagged-face and
notmuch-search-unread-face) make it easier to find the relevant face by
customizing notmuch-faces.  I plan to do the same to the other alists of
faces found elsewhere.
2016-08-02 13:40:44 +09:00
David Bremner
2ce0f1368f create .mailmap file (for git shortlog/blame)
Recently it was suggested on the list that we add a contributor to
AUTHORS. This file has been unmodified for 7 years, and is somewhat out
of date. It would potentially make sense to automagically update this
file during the release process using the output from git shortlog. This
file helps clean up some inconsistencies in author data in the history.
2016-07-29 06:01:44 +09:00
Jaime Velasco Juan
4bf82dea2d Fix typo in Message.maildir_flags_to_tags
It has been calling _tags_to_maildir_flags instead since the beginning,
2016-07-29 05:57:13 +09:00
David Bremner
92d8eae8f1 Merge branch 'release' 2016-07-19 09:03:19 -03:00
David Bremner
8fe58226ef debian: changelog stanza for 0.22.1-2 2016-07-19 08:51:33 -03:00
David Bremner
6cf6469e91 debian: add explicit build-depends on gnupg
apt dropped it's depends on gnupg, so we can't rely on it being present
in the build env anymore
2016-07-19 08:49:10 -03:00
David Bremner
b824ecc48f debian: changelog stanza for 0.22.1-1
Basically copy upstream NEWS
2016-07-19 06:43:20 -03:00
David Bremner
2d2d001081 NEWS: set date of point release 2016-07-19 06:36:15 -03:00
David Bremner
51816247d2 version: bump to 0.22 2016-07-19 06:33:37 -03:00
David Bremner
713f7d0c0c NEWS: initial NEWS for 0.22.1 2016-07-13 19:55:24 -03:00
David Bremner
09b18ae8f4 debian: add changelog stanza for 0.22.1~rc0-1
No actual changes discussed, because the NEWS file is yet to be
created.
2016-06-30 21:28:31 +02:00
David Bremner
308b44290d version: bump to 0.21.1~rc0
Getting ready for the point release
2016-06-30 17:52:42 +02:00