Re: [Kevin McCarthy] Bug#966100: notmuch-mutt: symlinking now fails for indexed mailboxes with a space in the name

2020-08-01 Thread David Bremner
Greg Anders writes: > From 92221d856e663450c1f55b9ec9a6aa69b4d27b3d Mon Sep 17 00:00:00 2001 > From: Greg Anders > Date: Sun, 26 Jul 2020 14:57:56 -0600 > Subject: [PATCH] notmuch-mutt: quote variables to prevent word splitting > > This fixes a bug where mail under directories with spaces in

[PATCH 14/14] test: regression tests for n_indexopts_{get,set}_decrypt_policy

2020-08-01 Thread David Bremner
The main criteria is that they don't crash. Working with a closed database is a bonus. --- test/T562-lib-database.sh | 39 +++ 1 file changed, 39 insertions(+) diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh index ce62eaa8..d6097418 100755

[PATCH 01/14] lib: return NULL from n_d_get_default_indexopts on error

2020-08-01 Thread David Bremner
This is a rare and probably serious programming error, so better not to silently return a default value. --- lib/indexopts.c | 2 +- lib/notmuch.h | 1 + test/T562-lib-database.sh | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/indexopts.c

[PATCH 13/14] test: regression test for traversing config list with closed db

2020-08-01 Thread David Bremner
Also mention error return in API docs --- lib/notmuch.h | 1 + test/T590-libconfig.sh | 22 ++ 2 files changed, 23 insertions(+) diff --git a/lib/notmuch.h b/lib/notmuch.h index 9a2a3b1f..f3cb0fe2 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -2291,6 +2291,7 @@

[PATCH 04/14] test: regression test for n_m_get_filenames

2020-08-01 Thread David Bremner
Closing the database after the iterator is created is not a problem. --- test/T566-lib-message.sh | 23 +++ 1 file changed, 23 insertions(+) diff --git a/test/T566-lib-message.sh b/test/T566-lib-message.sh index 3b0e85b5..0ba601f9 100755 --- a/test/T566-lib-message.sh +++

Re: [PATCH 03/23] emacs: Fix indentation

2020-08-01 Thread Jonas Bernoulli
Tomi Ollila writes: > On Sun, Jul 26 2020, Jonas Bernoulli wrote: >> @@ -473,7 +473,7 @@ (defun notmuch-mua-new-forward-messages (messages >> prompt-for-sender) >>(when (or prompt-for-sender notmuch-always-prompt-for-sender) >> (list (cons 'From

Re: [PATCH 1/2] test: drop NOTMUCH_DEFAULT_XAPIAN_BACKEND from T360-symbol-test

2020-08-01 Thread David Bremner
Tomi Ollila writes: > On Wed, Jul 29 2020, David Bremner wrote: >> -| notmuch_dir_sanitize | sed -e "s,\`,\',g" -e >> "s,${NOTMUCH_DEFAULT_XAPIAN_BACKEND},backend,g" > OUTPUT >> +| notmuch_dir_sanitize | sed -e "s,\`,\',g" -e "s,No [^ \t]* >> database,No XX database,g" > OUTPUT

Re: [PATCH 00/23] A great number of cosmetic changes

2020-08-01 Thread Jonas Bernoulli
Tomi Ollila writes: > Series looks good to me (as far as I can tell). That one comment > indentation in id:20200726165818.400-4-jo...@bernoul.li is what popped up > in my review (I did review only diff patch, and don't know how that > actually look -- like in those spaces after do in my previous

Final (v2) batch of patches in API exception handling cleanup

2020-08-01 Thread David Bremner
I'm going to mark these ready since the changes from the previous batch are trivial. Feel free to ping me if you want time to review. I'm sending again mainly to collect into one series for the historical record (patch 1/14 used to be separate) The non-test changes are [PATCH 01/14] lib: return

[PATCH 06/14] lib: catch exceptions in n_directory_get_child_directories

2020-08-01 Thread David Bremner
Also clarify API in error case. --- lib/directory.cc | 23 --- lib/notmuch.h | 2 ++ test/T563-lib-directory.sh | 1 - 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/lib/directory.cc b/lib/directory.cc index b9c3d77f..5d13afec 100644

[PATCH 12/14] test: regression test for n_d_get_config_list on closed db.

2020-08-01 Thread David Bremner
Exception is caught. --- test/T590-libconfig.sh | 15 +++ 1 file changed, 15 insertions(+) diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index 46f3a76d..602fad0b 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -61,6 +61,21 @@ valid = 0 EOF

[PATCH 10/14] lib: fix return value for n_directory_delete

2020-08-01 Thread David Bremner
Falling out of the catch meant the error return was lost --- lib/directory.cc | 2 +- test/T563-lib-directory.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/directory.cc b/lib/directory.cc index 79ceea31..eee8254e 100644 --- a/lib/directory.cc +++

[PATCH 03/14] test: split header for lib-message tests.

2020-08-01 Thread David Bremner
This allows finer control over when to close the database. --- test/T566-lib-message.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/T566-lib-message.sh b/test/T566-lib-message.sh index 4cf35810..3b0e85b5 100755 --- a/test/T566-lib-message.sh +++

[PATCH 07/14] test: add known broken test for n_directory_get_child_files

2020-08-01 Thread David Bremner
This is a clone of the one for get_child_directories --- test/T563-lib-directory.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh index 5e7da676..d71c884d 100755 --- a/test/T563-lib-directory.sh +++

[PATCH 11/14] test: regression test for n_directory_{get,set}_mtime

2020-08-01 Thread David Bremner
The mtime is cached, so closing the db is not a problem. Writing the mtime throws an exception, which is caught. --- test/T563-lib-directory.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh index 7e44e805..28325ff2

[PATCH 02/14] test: add regression test for n_messages_collect_tags

2020-08-01 Thread David Bremner
Also test n_messages_destroy. --- test/T568-lib-thread.sh | 31 +++ 1 file changed, 31 insertions(+) diff --git a/test/T568-lib-thread.sh b/test/T568-lib-thread.sh index 66066854..ac13d986 100755 --- a/test/T568-lib-thread.sh +++ b/test/T568-lib-thread.sh @@ -285,6

[PATCH 08/14] lib: catch exceptions in n_directory_get_child_files

2020-08-01 Thread David Bremner
Also clarify API in error case. --- lib/directory.cc | 12 lib/notmuch.h | 2 ++ test/T563-lib-directory.sh | 1 - 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/directory.cc b/lib/directory.cc index 5d13afec..79ceea31 100644 ---

[PATCH 09/14] test: known broken test for n_directory_delete with closed db.

2020-08-01 Thread David Bremner
There is a return value bug in notmuch_directory_delete that is hiding the exception. --- test/T563-lib-directory.sh | 36 1 file changed, 36 insertions(+) diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh index 61ed8add..b91a1c87 100755

[PATCH 05/14] test: add known broken test for n_directory_get_child_directories

2020-08-01 Thread David Bremner
Start a new test file (for the notmuch_directory_* API group) to hold this test. --- test/T563-lib-directory.sh | 61 ++ 1 file changed, 61 insertions(+) create mode 100755 test/T563-lib-directory.sh diff --git a/test/T563-lib-directory.sh