Commit graph

7356 commits

Author SHA1 Message Date
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
David Bremner
3bf6487359 doc: document new option show.extra_headers
Increase discoverability by cross referencing from the notmuch-show
manual entry to the notmuch-config manual entry.
2022-01-25 07:51:48 -04:00
David Bremner
88633bc7a7 CLI/setup: special case single item lists
This matches the heuristic used by "notmuch config set" to decide if
something is a list.

This change fixes the bug reported at [1].

[1]: id:6O3LTUhoXlrnkPWCtPJCP4cagU7mFVEdyTpcC_37BoSzStlARXDBa7oczy6hB0jyjGjBQvgj_jFV58cw0aNx-jUg1h1O-FQ7820k68C0X4M=@protonmail.com
2022-01-24 09:32:39 -04:00
David Bremner
82e1279790 test/setup: add known broken test for single items
In [1] Ian observed that notmuch setup was inconsistent with notmuch
config set when adding single items, namely adding an unneeded
semi-colon at the end. This test replicates that bug.

[1]: id:6O3LTUhoXlrnkPWCtPJCP4cagU7mFVEdyTpcC_37BoSzStlARXDBa7oczy6hB0jyjGjBQvgj_jFV58cw0aNx-jUg1h1O-FQ7820k68C0X4M=@protonmail.com
2022-01-24 09:31:00 -04:00
jao
15207652a1 emacs: customizable names for search buffers
Customizable names for buffers presenting search results, via two
custom variables (notmuch-search-buffer-name-format and
notmuch-saved-search-buffer-name-format), defaulting to values
currently used for plain searches and including too tree and
unthreaded search buffers.

Amended by db: spelling fix.
2022-01-23 20:47:49 -04:00
David Bremner
21cce961b9 emacs: define, use option :disable-excludes for n-h-query-counts
Initially only use in notmuch-hello-insert-alltags. This is a more
narrow resolution of [1], which (unlike [2]) does not disable exclude
processing for regular saved searches.

[1]: id:87wox1vovj.fsf@len.workgroup
[2]: id:20220105010606.2034601-2-david@tethera.net
2022-01-23 14:27:06 -04:00
David Bremner
68640fd967 Revert "emacs: use --exclude=false when checking for empty searches"
Revert commit 8370e3cfe2, and remark the
corresponding test as broken. Also update the expected output of the
broken test to show excludes active in the user defined saved searches.
2022-01-23 14:21:46 -04:00
David Bremner
2786aa4d54 lib/database: delete stemmer on destroy
Commit [0] left the stemmer object accessible, but did not add
de-allocation code to notmuch_database_destroy. This commit corrects
that oversight.

Leak originally reported by Austin Ray [1].

[0]: 3202e0d1fe
[1]: id:20220105224538.m36lnjn7rf3ieonc@athena
2022-01-22 21:14:29 -04:00
David Bremner
df7c5acd75 lib/config: move g_key_File_get_string before continue
In [1] Austin Ray reported some memory leaks in
notmuch_database_open. One of those leaks is caused by jumping to the
next key without freeing val. This change avoids that leak.

[1]: id:20220105224538.m36lnjn7rf3ieonc@athena
2022-01-22 21:14:29 -04:00
David Bremner
8dab460a08 test: add known broken test for memory leaks in open
This duplicates the memory leaks reported in [1]

[1]: id:20220105224538.m36lnjn7rf3ieonc@athena
2022-01-22 21:14:29 -04:00
David Bremner
5620dc142e configure: check for ASAN support
This will allow conditionally running tests that use the address sanitizer.
2022-01-22 21:14:29 -04:00
David Bremner
cc180507b0 emacs: use --exclude=false when counting total messages
Even if a user excludes a large fraction of their messages, they still
nonetheless exist and are searchable.
2022-01-20 15:32:21 -04:00
David Bremner
8370e3cfe2 emacs: use --exclude=false when checking for empty searches
In particular tags that only occur on otherwise excluded messages do
not show up in "All tags" without this change. The reported numbers
_do_ take excludes into account, so it is possible that
searches (e.g. the aformentioned tags) will show up with a count of
zero.
2022-01-20 15:31:36 -04:00
David Bremner
704aa76f5d test/emacs: add known broken test for hidden tags
Gregor Zattler observed that tags could be unintentionally hidden in
the "All tags" view, and Tomi Ollia worked out [2] that the issue was tags
that only occured on excluded messages. This test reproduces that bug.

[1]: id:87wox1vovj.fsf@len.workgroup
[2]: id:m28t9faaim.fsf@guru.guru-group.fi
2022-01-20 15:31:29 -04:00