]> git.cworth.org Git - notmuch-old/log
notmuch-old
2 years agodebian: don't skip test smime.4
David Bremner [Wed, 13 Apr 2022 11:15:10 +0000 (08:15 -0300)]
debian: don't skip test smime.4

The test is fixed now.

2 years agotest/smime: fix signature verification test with newer gmime.
David Bremner [Tue, 12 Apr 2022 20:15:56 +0000 (22:15 +0200)]
test/smime: fix signature verification test with newer gmime.

The extra machinery to check for the actual output format is justified
by the possibility that distros may patch this newer output format
into older versions of gmime.

Amended-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Michael J Gruber <git@grubix.eu>
Amended-again-by: db
2 years agoconfigure: restructure gmime cert validity checker code
David Bremner [Sat, 9 Apr 2022 12:34:52 +0000 (09:34 -0300)]
configure: restructure gmime cert validity checker code

The goal is to generalize this to also check the output format of
g_mime_certificate_get_email.

2 years agoMerge branch 'release'
David Bremner [Thu, 7 Apr 2022 22:48:16 +0000 (17:48 -0500)]
Merge branch 'release'

2 years agodebian: upload 0.35-2 ; disable failing test archive/debian/0.35-2 debian/0.35-2
David Bremner [Mon, 28 Mar 2022 13:56:22 +0000 (07:56 -0600)]
debian: upload 0.35-2 ; disable failing test

We should fix this flaky test upstream, but for now, fix the build.

2 years agotest: unset XDG_DATA_HOME and MAILDIR for tests.
David Bremner [Fri, 25 Mar 2022 17:51:02 +0000 (11:51 -0600)]
test: unset XDG_DATA_HOME and MAILDIR for tests.

The some of the tests (and the library functions they exercise) that
rely on XDG_CONFIG_HOME also check XDG_DATA_HOME and MAILDIR.

2 years agolib: do not phrase parse prefixed bracketed subexpressions
David Bremner [Fri, 25 Feb 2022 02:41:03 +0000 (22:41 -0400)]
lib: do not phrase parse prefixed bracketed subexpressions

Since Xapian does not preserve quotes when passing the subquery to a
field processor, we have to make a guess as to what the user
intended. Here the added assumption is that a string surrounded by
parens is not intended to be a phrase.

2 years agotest: known broken tests for bracketed terms in subject
David Bremner [Fri, 25 Feb 2022 02:41:02 +0000 (22:41 -0400)]
test: known broken tests for bracketed terms in subject

The heuristics in the field processor currently incorrectly trigger
phrase parsing.

2 years agoemacs: whitespace cleanup for keybindings
David Bremner [Sat, 12 Feb 2022 20:27:42 +0000 (16:27 -0400)]
emacs: whitespace cleanup for keybindings

Changing the width of a column requires rewriting all the rows.

2 years agoemacs: Document undo binding.
David Bremner [Sat, 12 Feb 2022 20:27:41 +0000 (16:27 -0400)]
emacs: Document undo binding.

This messes up whitespace, which will require a global change to fix.

2 years agoemacs: redirect undo to notmuch-tag-undo
David Bremner [Sat, 12 Feb 2022 20:27:40 +0000 (16:27 -0400)]
emacs: redirect undo to notmuch-tag-undo

The double remap is a bit ugly, but it seems better than adding
another layer of keymaps for those modes where notmuch-tag-undo makes
sense.

2 years agoemacs: add notmuch-tag-undo
David Bremner [Sat, 12 Feb 2022 20:27:39 +0000 (16:27 -0400)]
emacs: add notmuch-tag-undo

Keybindings are deferred to a future commit.

2 years agoemacs/tag: keep tag history
David Bremner [Sat, 12 Feb 2022 20:27:38 +0000 (16:27 -0400)]
emacs/tag: keep tag history

This buffer local list will be used to provide an undo facility for
tagging operations. Keeping history can be disabled with the new
OMIT-HIST option.

2 years agoemacs: remove non-batch code path from function notmuch-tag
David Bremner [Sat, 12 Feb 2022 20:27:37 +0000 (16:27 -0400)]
emacs: remove non-batch code path from function notmuch-tag

It is no slower (according to T06-emacs) to use batch for everything,
and it simplifies the code.

2 years agoperf-test: emacs tagging
David Bremner [Sat, 12 Feb 2022 20:27:36 +0000 (16:27 -0400)]
perf-test: emacs tagging

Time tag operations, to see if it is worthwhile keeping both the
batch and the non-batch calls to notmuch tag.

2 years agoperf-test: allow running test_emacs from performance test suite.
David Bremner [Sat, 12 Feb 2022 20:27:35 +0000 (16:27 -0400)]
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.

2 years agotest/emacs: split out tagging related tests
David Bremner [Sat, 12 Feb 2022 20:27:34 +0000 (16:27 -0400)]
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.

2 years agotest: split variable settings to their own file
David Bremner [Sat, 12 Feb 2022 20:27:33 +0000 (16:27 -0400)]
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.

2 years agodoc/emacs: add minimal documentation for notmuch-unthreaded mode.
David Bremner [Sat, 12 Feb 2022 20:27:32 +0000 (16:27 -0400)]
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.

2 years agodevel/notmuch-web: single user web front end using python-cffi
David Bremner [Sun, 16 Jan 2022 19:31:00 +0000 (15:31 -0400)]
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

2 years agoremoved use of 'echo -n' (and echo -n -e ...)
Tomi Ollila [Sun, 20 Feb 2022 22:30:45 +0000 (00:30 +0200)]
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.

2 years agodoc: use hyperlinks for config options in notmuch-insert(1)
David Bremner [Sun, 6 Feb 2022 14:02:37 +0000 (10:02 -0400)]
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.

2 years agodoc: add configuration section to notmuch-insert(1)
David Bremner [Sun, 6 Feb 2022 13:38:16 +0000 (09:38 -0400)]
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.

2 years agodoc: add configuration section to notmuch-new(1)
David Bremner [Sun, 6 Feb 2022 13:28:14 +0000 (09:28 -0400)]
doc: add configuration section to notmuch-new(1)

Increase discoverability.

2 years agodoc: alphabetize options in notmuch-config(1)
David Bremner [Sun, 6 Feb 2022 13:07:13 +0000 (09:07 -0400)]
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.

2 years agoCLI/insert: escape envelope from
David Bremner [Sat, 12 Feb 2022 02:47:03 +0000 (22:47 -0400)]
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 ':').

2 years agoCLI/insert: split copy_fd
David Bremner [Sun, 13 Feb 2022 14:48:47 +0000 (10:48 -0400)]
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.

2 years agotest: add known broken test for insert with mbox as input
David Bremner [Sat, 12 Feb 2022 02:10:07 +0000 (22:10 -0400)]
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.

2 years agotest: start new corpus of test messages for indexing code
David Bremner [Sat, 5 Feb 2022 19:52:10 +0000 (15:52 -0400)]
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.

2 years agopython-cffi: use config_pairs API in ConfigIterator
David Bremner [Wed, 9 Feb 2022 12:28:54 +0000 (08:28 -0400)]
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.

2 years agotest: known broken test for list(db.config) in python-cffi bindings
David Bremner [Wed, 9 Feb 2022 01:01:16 +0000 (21:01 -0400)]
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]: d7f95724132bf658fd151630185899737e2ed829

2 years agoemacs: escape quote in notmuch-search-result-format docstring
David Bremner [Wed, 16 Feb 2022 11:56:42 +0000 (07:56 -0400)]
emacs: escape quote in notmuch-search-result-format docstring

Prevent Emacs' mangling of quotes, which breaks the code sample.

2 years agoemacs: remove png logo
David Bremner [Sat, 5 Feb 2022 12:21:20 +0000 (08:21 -0400)]
emacs: remove png logo

Reduce chance of downstream packagers packing the wrong file.

2 years agodoc: make post-hook description more precise
inwit [Fri, 11 Feb 2022 16:56:32 +0000 (17:56 +0100)]
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.

2 years agogitignore: add bindings/python-cffi/_notmuch_config.py 0.35
David Bremner [Sun, 6 Feb 2022 17:14:54 +0000 (13:14 -0400)]
gitignore: add bindings/python-cffi/_notmuch_config.py

This is generated by configure and should not be committed.

2 years agoversion: bump to 0.35
David Bremner [Sun, 6 Feb 2022 17:11:32 +0000 (13:11 -0400)]
version: bump to 0.35

2 years agoNEWS: set release date for 0.35
David Bremner [Sun, 6 Feb 2022 17:10:43 +0000 (13:10 -0400)]
NEWS: set release date for 0.35

2 years agodebian: start changelog for 0.35
David Bremner [Sun, 6 Feb 2022 16:15:44 +0000 (12:15 -0400)]
debian: start changelog for 0.35

2 years agoNEWS: remaining items for 0.35 release
David Bremner [Sat, 5 Feb 2022 12:43:28 +0000 (08:43 -0400)]
NEWS: remaining items for 0.35 release

These are my best guesses based on git commit messages.

2 years agoNEWS: emacs/notmuch-logo.svg is there in 0.35
Tomi Ollila [Mon, 31 Jan 2022 20:47:43 +0000 (22:47 +0200)]
NEWS: emacs/notmuch-logo.svg is there in 0.35

2 years agoNEWS: my changes for 0.35
David Bremner [Sun, 30 Jan 2022 13:23:26 +0000 (09:23 -0400)]
NEWS: my changes for 0.35

2 years agodebian: changelog for 0.35~rc0-2 archive/debian/0.35_rc0-2 debian/0.35_rc0-2
David Bremner [Sun, 30 Jan 2022 01:54:00 +0000 (21:54 -0400)]
debian: changelog for 0.35~rc0-2

2 years agodebian: add missing install file for notmuch-doc archive/debian/0.35_rc0-1 debian/0.35_rc0-1
David Bremner [Sat, 29 Jan 2022 22:50:48 +0000 (18:50 -0400)]
debian: add missing install file for notmuch-doc

This was missed from commit 11f03c87a205ffa99ff5e7b301b03bf996a8d562

2 years agoNEWS: add stub for 0.35 0.35_rc0
David Bremner [Sat, 29 Jan 2022 22:17:23 +0000 (18:17 -0400)]
NEWS: add stub for 0.35

2 years agodebian: add changelog for 0.34~rc0-1
David Bremner [Sat, 29 Jan 2022 22:15:05 +0000 (18:15 -0400)]
debian: add changelog for 0.34~rc0-1

2 years agolib: bump minor version to 6.
David Bremner [Sat, 29 Jan 2022 22:13:26 +0000 (18:13 -0400)]
lib: bump minor version to 6.

One new status value and one configuration value added.

2 years agoversion: bump to 0.35~rc0
David Bremner [Sat, 29 Jan 2022 22:12:58 +0000 (18:12 -0400)]
version: bump to 0.35~rc0

Start release process for 0.35

2 years agodebian: package HTML docs
David Bremner [Wed, 26 Jan 2022 13:30:46 +0000 (09:30 -0400)]
debian: package HTML docs

This is particularly useful for the docs for the notmuch2 python
bindings, which are otherwise not packaged.

2 years agodoc: replace :math: for subscripts in notmuch-sexp-queries(7)
David Bremner [Wed, 26 Jan 2022 13:30:45 +0000 (09:30 -0400)]
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.

2 years agolib: strip trailing '/' from pathnames (sexp queries).
David Bremner [Fri, 21 Jan 2022 23:38:53 +0000 (19:38 -0400)]
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 '/'.

2 years agotest: add multiple path, folder sexp query tests
David Bremner [Fri, 21 Jan 2022 23:38:52 +0000 (19:38 -0400)]
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:.

2 years agolib: drop trailing slash for path and folder searches (infix)
David Bremner [Fri, 21 Jan 2022 23:38:51 +0000 (19:38 -0400)]
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

2 years agotest/sexp: tests for path, folder, including trailing '/' (sexp)
David Bremner [Fri, 21 Jan 2022 23:38:50 +0000 (19:38 -0400)]
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

2 years agotest: known broken tests for trailing / in path search (infix)
David Bremner [Fri, 21 Jan 2022 23:38:49 +0000 (19:38 -0400)]
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

2 years agotest: sanitize generated message files names
David Bremner [Fri, 21 Jan 2022 23:38:48 +0000 (19:38 -0400)]
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.

2 years agolib/parse-sexp: handle lastmod queries.
David Bremner [Thu, 20 Jan 2022 13:36:05 +0000 (09:36 -0400)]
lib/parse-sexp: handle lastmod queries.

This particular choice of converting strings to integers requires C++11.

2 years agotest/sexpr-search: add known broken tests for lastmod queries
David Bremner [Thu, 20 Jan 2022 13:36:04 +0000 (09:36 -0400)]
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.

2 years agolib/parse-sexp: support actual date queries.
David Bremner [Thu, 20 Jan 2022 13:36:03 +0000 (09:36 -0400)]
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).

2 years agolib/date: factor out date range parsing.
David Bremner [Thu, 20 Jan 2022 13:36:02 +0000 (09:36 -0400)]
lib/date: factor out date range parsing.

This will allow re-using the same logic in the s-expression parser.

2 years agolib/parse-sexp: support zero argument date queries
David Bremner [Thu, 20 Jan 2022 13:36:01 +0000 (09:36 -0400)]
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.

2 years agotest/search: add known broken tests for 'date' prefix
David Bremner [Thu, 20 Jan 2022 13:36:00 +0000 (09:36 -0400)]
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.

2 years agoemacs: use cached encoded copy for fcc
David Bremner [Thu, 20 Jan 2022 03:22:07 +0000 (23:22 -0400)]
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

2 years agotest/emacs: known broken test for matching fcc and sent message
David Bremner [Thu, 20 Jan 2022 01:23:30 +0000 (21:23 -0400)]
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.

2 years agotest: define test_expect_equal_message_body
David Bremner [Thu, 20 Jan 2022 11:48:35 +0000 (07:48 -0400)]
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.

2 years agotest/emacs: match mml settings in emacs_{fcc,deliver}_message
David Bremner [Thu, 20 Jan 2022 00:50:49 +0000 (20:50 -0400)]
test/emacs: match mml settings in emacs_{fcc,deliver}_message

This will allow the sending of signed messages via smtp in the test
suite.

2 years agodoc: document new option `show.extra_headers`
David Bremner [Tue, 18 Jan 2022 13:26:59 +0000 (09:26 -0400)]
doc: document new option `show.extra_headers`

Increase discoverability by cross referencing from the notmuch-show
manual entry to the notmuch-config manual entry.

2 years agoCLI/setup: special case single item lists
David Bremner [Mon, 17 Jan 2022 23:54:53 +0000 (19:54 -0400)]
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

2 years agotest/setup: add known broken test for single items
David Bremner [Mon, 17 Jan 2022 23:54:52 +0000 (19:54 -0400)]
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

2 years agoemacs: customizable names for search buffers
jao [Sun, 23 Jan 2022 19:54:17 +0000 (19:54 +0000)]
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.

2 years agoemacs: define, use option :disable-excludes for n-h-query-counts
David Bremner [Sat, 22 Jan 2022 17:44:40 +0000 (13:44 -0400)]
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

2 years agoRevert "emacs: use --exclude=false when checking for empty searches"
David Bremner [Sat, 22 Jan 2022 17:44:39 +0000 (13:44 -0400)]
Revert "emacs: use --exclude=false when checking for empty searches"

Revert commit 8370e3cfe2dd8a79323613c2bbf2f11db6134dac, 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.

2 years agolib/database: delete stemmer on destroy
David Bremner [Sun, 9 Jan 2022 14:38:05 +0000 (10:38 -0400)]
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]: 3202e0d1feba1ab955ba1c07098c00208f8f0ada
[1]: id:20220105224538.m36lnjn7rf3ieonc@athena

2 years agolib/config: move g_key_File_get_string before continue
David Bremner [Sun, 9 Jan 2022 14:38:04 +0000 (10:38 -0400)]
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

2 years agotest: add known broken test for memory leaks in open
David Bremner [Sun, 9 Jan 2022 14:38:03 +0000 (10:38 -0400)]
test: add known broken test for memory leaks in open

This duplicates the memory leaks reported in [1]

[1]: id:20220105224538.m36lnjn7rf3ieonc@athena

2 years agoconfigure: check for ASAN support
David Bremner [Sun, 9 Jan 2022 14:38:02 +0000 (10:38 -0400)]
configure: check for ASAN support

This will allow conditionally running tests that use the address sanitizer.

2 years agoemacs: use --exclude=false when counting total messages
David Bremner [Wed, 5 Jan 2022 01:06:06 +0000 (21:06 -0400)]
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.

2 years agoemacs: use --exclude=false when checking for empty searches
David Bremner [Wed, 5 Jan 2022 01:06:05 +0000 (21:06 -0400)]
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.

2 years agotest/emacs: add known broken test for hidden tags
David Bremner [Wed, 5 Jan 2022 01:06:04 +0000 (21:06 -0400)]
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

2 years agoCLI: print extra headers only for non-replies
David Bremner [Wed, 19 Jan 2022 01:26:45 +0000 (21:26 -0400)]
CLI: print extra headers only for non-replies

If in the future we decide to output extra headers for replies, this
should be controlled by a separate configuration option.

2 years agotest/emacs: known broken test for reply with extra headers set.
David Bremner [Tue, 18 Jan 2022 13:39:05 +0000 (09:39 -0400)]
test/emacs: known broken test for reply with extra headers set.

Although it makes sense for the extra headers to be added to the copy
of the message headers included in the sexp/json, it is a bit
surprising for them to show in the new message constructed for the
reply, especially when, as here, they are always missing/empty.

2 years agoCLI: print extra headers in structured output
David Bremner [Sat, 1 Jan 2022 12:01:36 +0000 (08:01 -0400)]
CLI: print extra headers in structured output

This is based on a patch from Johan Parin [1], which is in turn
responding to a bug report / feature requiest from Jan Malkhovski.

The update to the structured output documented in schemata is intended
to be upward compatible, so the format version stays the same

[1]: id:20191116162723.18343-1-johan.parin@gmail.com
[2]: id:87h8sdemnr.fsf@oxij.org

2 years agolib/config: add known config key "show.extra_headers"
David Bremner [Sat, 1 Jan 2022 12:01:35 +0000 (08:01 -0400)]
lib/config: add known config key "show.extra_headers"

Used in a following commit to enable including extra headers beyond
the default in structured output.

2 years agoCLI: stash pointer to database in sprinter structs
David Bremner [Sat, 1 Jan 2022 12:01:34 +0000 (08:01 -0400)]
CLI: stash pointer to database in sprinter structs

We already use an allocated (and presumably open) database as a talloc
context. Keeping the pointer in the allocated struct will allow us to
e.g. interrogate the configuration in a sprinter function without
threading the database all the way through the various levels of function.

2 years agotest: fix deprecation warning in symbol-test
David Bremner [Sat, 1 Jan 2022 12:47:16 +0000 (08:47 -0400)]
test: fix deprecation warning in symbol-test

Reduce the amount of noise in the build log.

2 years agocli/new: only ignore .notmuch at top level
David Bremner [Sun, 26 Dec 2021 12:24:10 +0000 (08:24 -0400)]
cli/new: only ignore .notmuch at top level

Since the bug was first reported in [1], notmuch has gained the
ability to have the database located outside the mail root, hence this
this change differs slightly from Jani's proposed solution [2] in not
using notmuch_database_get_path, but rather the already retrieved
mail_root.

[1]: id:87mwhifu9a.fsf@trouble.defaultvalue.org
[2]: id:87ios5v59p.fsf@nikula.org

2 years agotest: add known broken test for ignoring non-toplevel .notmuch
David Bremner [Sun, 26 Dec 2021 12:24:09 +0000 (08:24 -0400)]
test: add known broken test for ignoring non-toplevel .notmuch

In [1] Rob observed that notmuch new ignored directories called
.notmuch everywhere in the tree, where they should only (and now, with
split configs, at most) be ignored at the top level. Add a test to
demonstrate the problem.

[1]: id:87mwhifu9a.fsf@trouble.defaultvalue.org

2 years agolib/open: no default mail root in split configurations
David Bremner [Sat, 25 Dec 2021 13:33:05 +0000 (09:33 -0400)]
lib/open: no default mail root in split configurations

If we know the configuration is split, but there is no mail root
defined, this indicates a (lack of) configuration error. Currently
this can only arise in XDG configurations.

2 years agolib/config: make sure the config map exists when loading defaults
David Bremner [Sat, 25 Dec 2021 13:33:04 +0000 (09:33 -0400)]
lib/config: make sure the config map exists when loading defaults

We should not rely on one of the other "_notmuch_config_load_*"
functions being called before this one.

2 years agolib/open: use notmuch->params to track split status
David Bremner [Sat, 25 Dec 2021 13:33:03 +0000 (09:33 -0400)]
lib/open: use notmuch->params to track split status

Persisting this status will allow us to use the information in other
compilation units, in particular when setting configuration defaults.

2 years agolib/open: use db struct as talloc ctx for choose_database_path
David Bremner [Sat, 25 Dec 2021 13:33:02 +0000 (09:33 -0400)]
lib/open: use db struct as talloc ctx for choose_database_path

The extra talloc struct "local" was left over from before the notmuch
struct was allocated earlier. Having the notmuch struct available in
this function will allow more flexibility to track the configuration
variations (e.g. split vs. non-split).

2 years agotest/libconfig: add two tests for the config = "" case
David Bremner [Sat, 11 Dec 2021 12:49:12 +0000 (08:49 -0400)]
test/libconfig: add two tests for the config = "" case

If notmuch_database_open_with_config finds a database, but that
database is not in a legacy, non-split configuration, then it
currently incorrectly deduces the mail root and returns SUCCESS. Add
to two tests to demonstrate this bug.

2 years agotest/libconfig: save and restore config file
David Bremner [Sat, 11 Dec 2021 12:49:11 +0000 (08:49 -0400)]
test/libconfig: save and restore config file

Currently the config file is unusable for further tests requiring a
valid database path.

2 years agoemacs/notmuch-tag.el: add xmlns attribute to svg icons
LdBeth [Fri, 14 Jan 2022 13:15:00 +0000 (07:15 -0600)]
emacs/notmuch-tag.el: add xmlns attribute to svg icons

emacs-mac that compiled with OS X system API for image display
support cannot correctly render svg without xmlns parameter [1].

[1]: id:tencent_127AA231767438AC66FEE4DDB4BBF51DF909@qq.com

2 years agoMerge remote-tracking branch 'origin/release'
David Bremner [Wed, 12 Jan 2022 17:25:29 +0000 (13:25 -0400)]
Merge remote-tracking branch 'origin/release'

2 years agotest/gpgsm: use --with-colons when calculating fingerprint.
David Bremner [Tue, 11 Jan 2022 23:52:30 +0000 (19:52 -0400)]
test/gpgsm: use --with-colons when calculating fingerprint.

As stressed by the gpg documentation, the non-'with-colons' output
format is subject to change, and indeed it did in 2.3.x (x<=3). This
should make the the test suite more robust against such changes.

2 years agoconfigure: Ignore more options that Fedora spec macros expect
Michael J Gruber [Tue, 11 Jan 2022 10:13:34 +0000 (11:13 +0100)]
configure: Ignore more options that Fedora spec macros expect

Signed-off-by: Michael J Gruber <git@grubix.eu>
2 years agoemacs: make header line in notmuch-show buffers optional
jao [Mon, 10 Jan 2022 03:05:23 +0000 (03:05 +0000)]
emacs: make header line in notmuch-show buffers optional

New notmuch-show-header-line customizable boolean to allow inhibiting
a header line in notmuch-show-mode buffers (for instance, because one
prefers to just include Subject in notmuch-message-headers).

2 years agoMerge tag '0.34.3'
David Bremner [Sun, 9 Jan 2022 23:34:58 +0000 (19:34 -0400)]
Merge tag '0.34.3'

notmuch 0.34.3 release

2 years agodoc: add 2022 to copyright years. 0.34.3 archive/debian/0.34.3-1 debian/0.34.3-1
David Bremner [Sun, 9 Jan 2022 19:35:52 +0000 (15:35 -0400)]
doc: add 2022 to copyright years.

2 years agoversion: bump to 0.34.3
David Bremner [Sun, 9 Jan 2022 19:35:12 +0000 (15:35 -0400)]
version: bump to 0.34.3