Commit graph

7519 commits

Author SHA1 Message Date
David Bremner
b21fa0e433 perf-test: allow running test_emacs from performance test suite.
test_require_external prereq has to move to test-lib-common.sh, and
the new shell functions print_emacs_header and time_emacs are provided.

The somewhat indirect way of printing the output is to avoid the extra
"" present on string values from emacsclient.
2022-02-25 08:38:03 -04:00
David Bremner
c4c6045058 test/emacs: split out tagging related tests
T310-emacs is one of the largest and longest running sets of
tests. Splitting out the tagging operations will help maintainability
as well as potentially improve the parallel running time of the test
suite. Some slowdown in running the tests sequentially may result
since there is repeated setup.
2022-02-25 08:37:50 -04:00
David Bremner
371fa28ced test: split variable settings to their own file
This allows sharing more variable settings between the (correctness)
tests and the performance-tests. Unfortunately it seems a bit tricky
to move settings to test-lib-common.sh, as that is sourced late in
test-lib.sh, and moving it earlier breaks things.
2022-02-25 08:37:14 -04:00
David Bremner
92b6b991b0 doc/emacs: add minimal documentation for notmuch-unthreaded mode.
If nothing else it means the mode is discoverable by browsing the
documentation, and also provides a target for links when enumerating
modes.
2022-02-25 08:36:51 -04:00
David Bremner
3a311ed5ec devel/notmuch-web: single user web front end using python-cffi
Originally contributed by Brian Sniffen [1]. Quite a few unpublished
fixes from Daniel Kahn Gilmour. We've been running it a few years now
as the "official" archive of the notmuch mailing list. There also a
few fixes from myself and Austin Ray. Finally I converted it to the
new python bindings.

This commit squashes the several years of development history and
moves it under devel, in recognition of the now established role it
plays in the project infrastructure.

[1]: id:87tvyvp4f2.fsf@istari.evenmere.org
2022-02-25 08:20:31 -04:00
Tomi Ollila
08da7f25e5 removed use of 'echo -n' (and echo -n -e ...)
In most cases used printf %s ... instead.

echo -n > file  lines to create empty / truncate files were
changed to : > file lines, like done in in test-lib-emacs.sh

And one echo -n "  " replaced with use of sed "s/^/  /" in next line.
2022-02-21 09:36:39 -04:00
David Bremner
999706c4d5 doc: use hyperlinks for config options in notmuch-insert(1)
The tradeoff is no bold/italic in the man pages to get actual
hyperlinks in the html output.
2022-02-20 09:33:56 -04:00
David Bremner
75f86b39c3 doc: add configuration section to notmuch-insert(1)
This is partially redudant given some existing cross references, but
it is useful to have all of the config keys listed in one place, to
help keep track of them if nothing else.
2022-02-20 09:33:56 -04:00
David Bremner
8060022bdf doc: add configuration section to notmuch-new(1)
Increase discoverability.
2022-02-20 09:33:56 -04:00
David Bremner
69289c5d62 doc: alphabetize options in notmuch-config(1)
Originally (I think) these were in the order generated by notmuch
setup. As the number of options grows, and several are not in the
initial setup generated file, the original order becomes less useful
for users. This commit alphabetizes the keys to help users
search. There is only one content change, an added cross-reference
from user.other_email to user.primary_email.
2022-02-20 09:33:56 -04:00
David Bremner
b320d3fb59 CLI/insert: escape envelope from
The idea is to do as little parsing and modification of the delivered
message as possible. Luckily the position of the "envelope header"
lets us escape it by replacing the first 5 characters of the stream
with a regular header name (with ':').
2022-02-19 22:11:35 -04:00
David Bremner
329bb4ddf4 CLI/insert: split copy_fd
This helps maintainability and enables code-reuse of our home-brewed
buffered-write code.

This commit is mostly code movement.
2022-02-19 22:08:55 -04:00
David Bremner
4a380371e7 test: add known broken test for insert with mbox as input
It seems reasonable that notmuch should try to avoid delivering
messages in formats it cannot index.
2022-02-19 20:15:10 -04:00
David Bremner
190d8a7711 test: start new corpus of test messages for indexing code
This particular message is not recognized by notmuch as mail, but is
fine according to e.g. mutt. The trigger for this bad behaviour seems
to be a second "From " ocurring at the beginning of the line but
inside an attachment.
2022-02-19 20:14:18 -04:00
David Bremner
9ddd13f758 python-cffi: use config_pairs API in ConfigIterator
This returns all of the config keys with non-empty values, not just
those that happen to be stored in the database.
2022-02-16 21:57:22 -04:00
David Bremner
e221a4531f test: known broken test for list(db.config) in python-cffi bindings
As of notmuch 0.34.2 [1], the python-cffi bindings make available the
configuration from both a config file and the database when accessing
Database.config like a dictionary.  It is therefore confusing that the
iterator operations only work on the configuration information stored
in the database.

[1]: d7f9572413
2022-02-16 21:55:45 -04:00
David Bremner
6286b76a69 emacs: escape quote in notmuch-search-result-format docstring
Prevent Emacs' mangling of quotes, which breaks the code sample.
2022-02-16 07:56:42 -04:00
David Bremner
e1e1b1176d emacs: remove png logo
Reduce chance of downstream packagers packing the wrong file.
2022-02-12 20:18:44 -04:00
inwit
56f41d7b36 doc: make post-hook description more precise
Add the word "any" to the description of post-new hook description in
order to clarify that it is always run, even if there are no new
messages.
2022-02-11 13:39:07 -04:00
David Bremner
7b5921877e gitignore: add bindings/python-cffi/_notmuch_config.py
This is generated by configure and should not be committed.
2022-02-06 13:16:24 -04:00
David Bremner
b87373f8c4 version: bump to 0.35 2022-02-06 13:11:32 -04:00
David Bremner
748154646e NEWS: set release date for 0.35 2022-02-06 13:10:43 -04:00
David Bremner
0bdd9ffd84 debian: start changelog for 0.35 2022-02-06 12:15:44 -04:00
David Bremner
a4c58cbc1d NEWS: remaining items for 0.35 release
These are my best guesses based on git commit messages.
2022-02-05 08:43:28 -04:00
Tomi Ollila
0c357ce785 NEWS: emacs/notmuch-logo.svg is there in 0.35 2022-01-31 19:20:49 -04:00
David Bremner
437d15044c NEWS: my changes for 0.35 2022-01-31 15:49:58 -04:00
David Bremner
28600c6ea1 debian: changelog for 0.35~rc0-2 2022-01-29 21:55:01 -04:00
David Bremner
ade8202c18 debian: add missing install file for notmuch-doc
This was missed from commit 11f03c87a2
2022-01-29 18:50:48 -04:00
David Bremner
6a9f66ef32 NEWS: add stub for 0.35 2022-01-29 18:17:23 -04:00
David Bremner
8700036736 debian: add changelog for 0.34~rc0-1 2022-01-29 18:15:05 -04:00
David Bremner
7f8af14bdc lib: bump minor version to 6.
One new status value and one configuration value added.
2022-01-29 18:13:26 -04:00
David Bremner
addeb11e37 version: bump to 0.35~rc0
Start release process for 0.35
2022-01-29 18:12:58 -04:00
David Bremner
11f03c87a2 debian: package HTML docs
This is particularly useful for the docs for the notmuch2 python
bindings, which are otherwise not packaged.
2022-01-29 16:45:07 -04:00
David Bremner
5c183d814b doc: replace :math: for subscripts in notmuch-sexp-queries(7)
Sphinx pulls in mathjax to do :math:, which complicates viewing the
html version offline. The direct :sub: is supported directly in html.
2022-01-29 16:37:59 -04:00
David Bremner
2c1d1107f5 lib: strip trailing '/' from pathnames (sexp queries).
This changes makes the sexp query parser consistent with the infix one
in ignoring trailing '/'. Here we do a bit better and ignore any
number of trailing '/'.
2022-01-27 07:48:27 -04:00
David Bremner
8358841c66 test: add multiple path, folder sexp query tests
This is mainly to make sure we get trailing / removal correct. Also
add regression test for path: in the infix parser matching the
existing one for folder:.
2022-01-27 07:48:27 -04:00
David Bremner
c62c22c9fb lib: drop trailing slash for path and folder searches (infix)
This resolves an old bug reported by David Edmondson in 2014. The fix
is only needed for the "boolean" case, as probabilistic / phrase
searching already ignores punctuation.

This fix is only for the infix (xapian provided) query parser.

[1]: id:cunoasuolcv.fsf@gargravarr.hh.sledj.net
2022-01-27 07:48:27 -04:00
David Bremner
c73e273aaf test/sexp: tests for path, folder, including trailing '/' (sexp)
This duplicates the bug reported in [1], as well as adding some simple
regression tests for 'path' and 'folder' searches which were
previously missing for sexp syntax.

[1]: id:cunoasuolcv.fsf@gargravarr.hh.sledj.net
2022-01-27 07:48:27 -04:00
David Bremner
053a390370 test: known broken tests for trailing / in path search (infix)
In [1], David Edmondson observed that the trailing / added by many
completion mechanisms causes path searches to silently fail.  This
test reproduces that bug for both `path:' and `folder:' searches.

[1]: id:cunoasuolcv.fsf@gargravarr.hh.sledj.net
2022-01-27 07:48:27 -04:00
David Bremner
0756105832 test: sanitize generated message files names
It is fragile to encode the generated names into tests, as it makes
tests break when e.g. new tests are added.  There is a possibility
that this will hide certain failures; in that case meaningful filenames
should be chosen for the generated messages.
2022-01-27 07:48:27 -04:00
David Bremner
0a32741fce lib/parse-sexp: handle lastmod queries.
This particular choice of converting strings to integers requires C++11.
2022-01-26 07:41:02 -04:00
David Bremner
341016c8ec test/sexpr-search: add known broken tests for lastmod queries
These are loosely modelled on the tests just above for date ranges,
since the error conditions are similar. Some ideas also borrowed from
T570-revision-tracking.
2022-01-26 07:41:02 -04:00
David Bremner
77ab961a1d lib/parse-sexp: support actual date queries.
The default argument processing overlaps somewhat with what is already
done in _notmuch_date_strings_to_query, but we can give more specific
error messages for the s-expression context.

The extra generality of _sexp_parse_range will be useful when we
implement additional range prefixes (at least 'lastmod' is needed).
2022-01-26 07:41:02 -04:00
David Bremner
bf3cc5eed2 lib/date: factor out date range parsing.
This will allow re-using the same logic in the s-expression parser.
2022-01-26 07:41:02 -04:00
David Bremner
303f207a54 lib/parse-sexp: support zero argument date queries
These are not too practical, although they may simplify some user
query generation code. Mainly this adds a new prefix keyword to the
parser.
2022-01-26 07:41:02 -04:00
David Bremner
e02bf15a4f test/search: add known broken tests for 'date' prefix
This is documented, but apparently not implemented. Add tests for
planned supported syntax and error messages.
2022-01-26 07:41:02 -04:00
David Bremner
da302e1cba emacs: use cached encoded copy for fcc
This fixes the bug reported by dkg in [1]. The movement of the call to
n-m-setup-message-for-saving is so the cleanup of Fcc headers happens
in the encoded version (otherwise Fcc headers may be saved to disk).

[1]: id:87k1zm225v.fsf@fifthhorseman.net
2022-01-26 07:22:09 -04:00
David Bremner
8179c3d114 test/emacs: known broken test for matching fcc and sent message
Based on the method outlined by Daniel Kahn Gillmor in
id:87k1zm225v.fsf@fifthhorseman.net.  With a delay of 0.2 seconds the
test becomes flaky on my machine. With a 1 second delay it fails
consistently for more than 1600 iterations.
2022-01-26 07:22:09 -04:00
David Bremner
b559240bb1 test: define test_expect_equal_message_body
This is a relatively simple sed invocation, but rather than write a
comment everywhere, give it a descriptive name.
2022-01-26 07:22:09 -04:00
David Bremner
c8d292e25b test/emacs: match mml settings in emacs_{fcc,deliver}_message
This will allow the sending of signed messages via smtp in the test
suite.
2022-01-26 07:22:09 -04:00