]> git.notmuchmail.org Git - notmuch/log
notmuch
2 years agotest: replace deprecated use of notmuch_database_open_verbose
David Bremner [Sat, 21 May 2022 18:06:29 +0000 (15:06 -0300)]
test: replace deprecated use of notmuch_database_open_verbose

We need to do it some day, and it is a bit annoying to read
deprecation messages in broken tests.

2 years agodoc/emacs: document a few notmuch-hello customizable variables.
David Bremner [Mon, 16 May 2022 10:46:10 +0000 (07:46 -0300)]
doc/emacs: document a few notmuch-hello customizable variables.

A user asked about the thousands separator on IRC, and I had to check
the source.

2 years agotest: make T450 independent of application/octet-stream interpretation
Michael J Gruber [Thu, 26 May 2022 16:52:32 +0000 (18:52 +0200)]
test: make T450 independent of application/octet-stream interpretation

The actual content type of `application/octet-stream` is up to content
type detection of the reader, and thus may not be stable across
implementations or versions. This showed up when

fd46fc19 ("emacs:  document/defcustom notmuch-multipart/alternative-discouraged", 2022-05-14)

introduced a test for omitting a part of type `text/html` because it
expected a part of type `application/octet-stream` to remain in place,
i.e. a part of "unstable type". In particular, tests with `fd46fc19`
would succeed on RHEL/EPEL but fail on all current Fedoras with

```
 FAIL   multipart/alternative hides html by default
--- T450-emacs-show.16.notmuch-show-multipart-alternative 2022-05-26 15:34:42.100557244 +0000
+++ T450-emacs-show.16.OUTPUT 2022-05-26 15:34:42.102557207 +0000
@@ -24,7 +24,7 @@
 uses 64 as the
 buffer size.
 [ text/html (hidden) ]
-[ 0001-Deal-with-situation-where-sysconf-_SC_GETPW_R_SIZE_M.patch: application/octet-stream (as text/x-diff) ]
+[ 0001-Deal-with-situation-where-sysconf-_SC_GETPW_R_SIZE_M.patch: application/octet-stream (as text/x-patch) ]
 From e3bc4bbd7b9d0d086816ab5f8f2d6ffea1dd3ea4 Mon Sep 17 00:00:00 2001
 From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>
 Date: Tue, 17 Nov 2009 11:30:39 -0800
```

due to the different type detected.

Fix this by giving that message a specicific type of `text/x-diff` in
the test corpus, and adjust all affected test outputs.

Signed-off-by: Michael J Gruber <git@grubix.eu>
Amended-by: db, fix some trailing whitespace
2 years agoMerge branch 'release'
David Bremner [Thu, 26 May 2022 11:35:16 +0000 (08:35 -0300)]
Merge branch 'release'

2 years agolib/message: use false from stdbool.h
David Bremner [Thu, 26 May 2022 11:30:00 +0000 (08:30 -0300)]
lib/message: use false from stdbool.h

As far as I know, this is just a style / consistency thing, unless
notmuch code starts defining FALSE inconsistently with false.

2 years agomerge uninitialized field fix from release
David Bremner [Thu, 26 May 2022 11:18:27 +0000 (08:18 -0300)]
merge uninitialized field fix from release

2 years agolib: fix uninitialized field in message objects.
David Bremner [Fri, 20 May 2022 12:46:39 +0000 (09:46 -0300)]
lib: fix uninitialized field in message objects.

Initially reported by Eliza Vasquez [1] (via valgrind).

[1]: id:87o7zxj086.fsf@eliza.

2 years agoemacs: document/defcustom notmuch-multipart/alternative-discouraged
David Bremner [Sat, 14 May 2022 11:26:38 +0000 (08:26 -0300)]
emacs:  document/defcustom notmuch-multipart/alternative-discouraged

This variable is important for people who want to change the default
behaviour when displaying multipart/alternative messages.  Previously
it was undocumented.  Add a defcustom to help users and copy some
documentation from the wiki. The usual machinery of re-using
docstrings is a bit tricky to use here because it mangles the example
lisp code, and the link to the info node should not be in e.g. the
html page.

Add a simple test to make sure the switch from defvar to defcustom did
not break something obvious.

2 years agodoc: define and use semantic markup for configuration items
David Bremner [Thu, 12 May 2022 11:52:30 +0000 (08:52 -0300)]
doc: define and use semantic markup for configuration items

This makes sure each configuration item is cross referenceable without
extra markup, and also adds index entries.

2 years agoemacs/reply: restrict what mime types are inlined by default
David Bremner [Sat, 19 Mar 2022 10:07:54 +0000 (07:07 -0300)]
emacs/reply: restrict what mime types are inlined by default

Apply the previously factored-out function used by notmuch-show.

2 years agoemacs: factor out calculation of mm-inline-override-types
David Bremner [Sat, 19 Mar 2022 10:07:53 +0000 (07:07 -0300)]
emacs: factor out calculation of mm-inline-override-types

The intended use case of this new function is to make reply behaviour
track that of show with respect to attachments.

Also fix the glob (which worked by fluke) into the documented regexp.

2 years agotest: add known broken test for inlining in emacs/reply
David Bremner [Sat, 19 Mar 2022 10:07:52 +0000 (07:07 -0300)]
test: add known broken test for inlining in emacs/reply

The same mitigation already applied for show should also be applied
for reply

2 years agotest/emacs: add regression test for display of tar attachments
David Bremner [Sat, 19 Mar 2022 10:07:51 +0000 (07:07 -0300)]
test/emacs: add regression test for display of tar attachments

These should continue to display as buttons by default, even as we
update the handling for reply.

2 years agotest: start corpus for attachments
David Bremner [Sat, 19 Mar 2022 10:07:50 +0000 (07:07 -0300)]
test: start corpus for attachments

Initially these are to test the emacs frontend.

2 years agodoc/emacs: document notmuch-show-toggle-toggle-elide-non-matching
David Bremner [Thu, 12 May 2022 10:47:52 +0000 (07:47 -0300)]
doc/emacs: document notmuch-show-toggle-toggle-elide-non-matching

Recently there was a question on the mailing list about the existence
of this function, so let us try to make it more discoverable.

2 years agodoc/sexp-queries: be more consistent about ending example text
David Bremner [Sat, 30 Apr 2022 17:18:37 +0000 (14:18 -0300)]
doc/sexp-queries: be more consistent about ending example text

Most, but not all of the the explanatory texts already end in
'.'. This makes the remainder match.

2 years agodoc/sexp-queries: fix example
David Bremner [Sat, 30 Apr 2022 17:13:03 +0000 (14:13 -0300)]
doc/sexp-queries: fix example

Update the explanatory text to match the query.

2 years agodoc/sexp-queries: escape @ in non-verbatim text
David Bremner [Thu, 28 Apr 2022 23:46:07 +0000 (20:46 -0300)]
doc/sexp-queries: escape @ in non-verbatim text

This prevents sphinx-doc from creating spurious mailto: links. Thanks
to Jakub Wilk for telling me about the fix.

2 years agoMerge branch 'release'
David Bremner [Mon, 25 Apr 2022 12:07:45 +0000 (09:07 -0300)]
Merge branch 'release'

2 years agodebian: changelog for 0.36-1 0.36 archive/debian/0.36-1 debian/0.36-1
David Bremner [Mon, 25 Apr 2022 11:48:07 +0000 (08:48 -0300)]
debian: changelog for 0.36-1

2 years agoNEWS: set release date
David Bremner [Mon, 25 Apr 2022 11:47:07 +0000 (08:47 -0300)]
NEWS: set release date

2 years agoversion: bump to 0.36
David Bremner [Mon, 25 Apr 2022 11:45:12 +0000 (08:45 -0300)]
version: bump to 0.36

2 years agoMerge branch 'release'
David Bremner [Fri, 22 Apr 2022 12:30:51 +0000 (09:30 -0300)]
Merge branch 'release'

2 years agoNEWS: user visible changes for 0.36
David Bremner [Sat, 16 Apr 2022 12:27:02 +0000 (09:27 -0300)]
NEWS: user visible changes for 0.36

2 years agoNEWS: fix location for notmuch-web
David Bremner [Sat, 16 Apr 2022 12:27:01 +0000 (09:27 -0300)]
NEWS: fix location for notmuch-web

It actually lives under 'devel/', not 'contrib/`.

2 years agoconfigure: avoid warning with -Wall
Michael J Gruber [Mon, 18 Apr 2022 14:48:50 +0000 (16:48 +0200)]
configure: avoid warning with -Wall

7228fe68 ("configure: restructure gmime cert validity checker code",
2022-04-09) restructured generated C code to repurpose it later on. This
put usage of `validity` within an `#if`, resulting in an "unused
warning" if that `#if` is not executed.

Put the variable declariation inside the same if branch and, thus,  quel
the warning.

Signed-off-by: Michael J Gruber <git@grubix.eu>
2 years agodebian: changelog for 0.36~rc1-1 archive/debian/0.36_rc1-1 debian/0.36_rc1-1
David Bremner [Sat, 16 Apr 2022 11:38:04 +0000 (08:38 -0300)]
debian: changelog for 0.36~rc1-1

2 years agoversion: bump to new release candidate 0.36_rc1
David Bremner [Sat, 16 Apr 2022 11:26:27 +0000 (08:26 -0300)]
version: bump to new release candidate

2 years agofix build without sfsexp
Michael J Gruber [Fri, 15 Apr 2022 16:23:46 +0000 (18:23 +0200)]
fix build without sfsexp

a1d139de ("lib: add sexp: prefix to Xapian (infix) query parser.",
2022-04-09) introduced sfsexp infix queries. This requires the infix
preprocessor to be built in in a way which does not require sfsexp when
notmuch is built without it.

Make the preprocessor throw a Xapian error in this case (and fix the
build).

Signed-off-by: Michael J Gruber <git@grubix.eu>
2 years agorelease: automate upload of pre-release tarballs 0.36_rc0 archive/debian/0.36_rc0-1 debian/0.36_rc0-1
David Bremner [Fri, 15 Apr 2022 12:17:30 +0000 (09:17 -0300)]
release: automate upload of pre-release tarballs

The tarballs were requested by some distro-packagers, and this
automation will hopefully reduce the number of errors from the current
manual process.

2 years agorelease: save more release files to releases/
David Bremner [Fri, 15 Apr 2022 12:11:28 +0000 (09:11 -0300)]
release: save more release files to releases/

The main change is to move the signatures to releases/ when invoking
the pre-release target; also stash the debian symlink for the release
target.

2 years agoNEWS: add header for 0.36
David Bremner [Fri, 15 Apr 2022 11:47:37 +0000 (08:47 -0300)]
NEWS: add header for 0.36

2 years agodebian: changelog for 0.36~rc0-1
David Bremner [Fri, 15 Apr 2022 11:45:28 +0000 (08:45 -0300)]
debian: changelog for 0.36~rc0-1

2 years agoversion: bump to 0.36~rc0
David Bremner [Fri, 15 Apr 2022 11:42:22 +0000 (08:42 -0300)]
version: bump to 0.36~rc0

2 years agolib: add sexp: prefix to Xapian (infix) query parser.
David Bremner [Sat, 9 Apr 2022 19:45:48 +0000 (16:45 -0300)]
lib: add sexp: prefix to Xapian (infix) query parser.

This is analogous to the "infix" prefix provided by the s-expression
based query parser.

2 years agotest/sexp: add test for and of stemmed terms.
David Bremner [Sat, 9 Apr 2022 19:45:47 +0000 (16:45 -0300)]
test/sexp: add test for and of stemmed terms.

Previously only singled stemmed terms were tested.

2 years agoconfigure: clean up new test source and binary files.
David Bremner [Wed, 13 Apr 2022 11:23:04 +0000 (08:23 -0300)]
configure: clean up new test source and binary files.

The previous source was renamed and a new binary generated in
commit 8723e707c15f7b435f07f5d5ea693496bb9769bb.

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.