Re: (setq notmuch-search-oldest-first nil) doesn't behave as expected

2021-08-02 Thread Firmin Martin
Thanks for your reply. The question was still relevant. David Bremner writes: > Firmin Martin writes: > >> >> For now, I can sort my email newest-first by customized the >> variable. But I would prefer to use setq if possible. > > It's a buffer-local variable, so you should use setq-default. >

[PATCH 1/2] test/count: mark subtests needing gdb.

2021-08-02 Thread David Bremner
The tests will otherwise fail if gdb is not installed. Thanks to Milton Vandersloot for pointing out the problem [1]: id:ztMWvyn1Vw0FloPT7NYTkFoY9Fm1Ez4YgMfYh99Te-Y6yXRtAXuEIfVrodhRKDSxjg-zOJa_RTQ68AtSbSO-ESla5BFLfG7sw5RTGRhEQwI=@protonmail.com --- test/T060-count.sh | 2 ++ 1 file changed, 2

[PATCH 2/2] test/atomicity: use ${TEST_GDB} in prereq test.

2021-08-02 Thread David Bremner
The other occurrence of gdb was replaced in 95efe2d4, so we should be consistent. --- test/T380-atomicity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh index afe49d93..6495381f 100755 --- a/test/T380-atomicity.sh +++

Re: Mark Emacs as prerequisite for tests which require it

2021-08-02 Thread David Bremner
Milton Vandersloot writes: > Dear notmuch developers > > The notmuch test suite depends on some external dependencies to finish > successfully (i.e. no failures but maybe some skips), one of them being Emacs. > As I had no Emacs installed, I discovered that some tests fail and do not > state

[PATCH 2/8] test/expect_equal_file: whitespace cleanup

2021-08-02 Thread David Bremner
No functional change, just reindent to Emacs defaults. --- test/test-lib.sh | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 67ad8853..10ee9b72 100644 --- a/test/test-lib.sh +++

[PATCH 7/8] lib/open: look in MAILDIR for database, as documented.

2021-08-02 Thread David Bremner
This fixes the bug id:87bl9lx864@kisara.moe --- lib/open.cc | 4 test/T055-path-config.sh | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/open.cc b/lib/open.cc index 7b95c5b1..280ffee3 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -220,6 +220,10

[PATCH 4/8] test: add test_expect_equal_file_nonempty

2021-08-02 Thread David Bremner
A common bug in tests is that the code used to generate the EXPECTED file fails, generating no output. When the code generating the OUTPUT file fails in the same way, the test passes, even though there is a failure being hidden. Add a new test function that guards against this. ---

[PATCH 5/8] test/path-config: use test_expect_equal_file_nonempty

2021-08-02 Thread David Bremner
This is more robust against crashes when the expected output is also generated by notmuch. In the case where the expected output is explicit, it seems like overkill. --- test/T055-path-config.sh | 11 +-- test/test-lib.sh | 1 + 2 files changed, 6 insertions(+), 6 deletions(-)

[PATCH 3/8] test: factor out test_diff_file_

2021-08-02 Thread David Bremner
A following commit will use this new function in a public test function. --- test/test-lib.sh | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 10ee9b72..a8e57e51 100644 --- a/test/test-lib.sh +++

[PATCH 1/8] test/path-config: define config_subtest

2021-08-02 Thread David Bremner
This will allow adding "hook code" to be run for a particular configuration, in particular marking all tests in a given configuration as broken. --- test/T055-path-config.sh | 48 1 file changed, 29 insertions(+), 19 deletions(-) diff --git

[PATCH 6/8] test: add known broken tests for finding database via MAILDIR

2021-08-02 Thread David Bremner
This highlights a bug reported by several users, including Mohsin Kaleem [1]. The use of test_begin_subtest is because these tests pass even though the database cannot be located. [1]: id:87bl9lx864@kisara.moe --- test/T055-path-config.sh | 34 ++ 1 file

[PATCH 8/8] doc: document database search algorithm.

2021-08-02 Thread David Bremner
Essentially a translation of the function _choose_database_path for human consumption. As a bonus, document environment variable NOTMUCH_DATABASE --- doc/man1/notmuch-config.rst | 21 - doc/man1/notmuch.rst| 5 + 2 files changed, 25 insertions(+), 1 deletion(-)

Re: [PATCH] test: aggregate-results updates

2021-08-02 Thread David Bremner
Tomi Ollila writes: > - mkdir -p "$test_results_dir" > + test -d "$test_results_dir" || mkdir "$test_results_dir" Lately I've notice some complaints during parallel test running mkdir: cannot create directory '/home/bremner/software/upstream/notmuch/test/test-results': File

Re: [EMACS] feature proposal (with code): notmuch-rainbow-tags.el

2021-08-02 Thread Dan Čermák
Hi Alexander, Alexander Adolf writes: > Hello, > > I have been a contributor to the astroid email client [1], which is > based on notmuch. I've now fully committed to living in Emacs. > > One thing that intrigued me about astroid, is its "rainbow tags" feature > (see screenshot at [1]). > >

[PATCH] test: use --minversion to detect GNU Parallel.

2021-08-02 Thread David Bremner
Based on a suggestion of Ole Tange [1]. [1]: id:CA+4vN7x6jp4HCiEybZ=5g+2X6Pa7etBFX3Bbd=uyty37gr6...@mail.gmail.com --- test/notmuch-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/notmuch-test b/test/notmuch-test index ce142f7c..eefdf091 100755 ---

look in MAILDIR for database

2021-08-02 Thread David Bremner
0.32 introduced a regression where notmuch stopped finding the database of people who specified it via Maildir. The actual code fix is in [PATCH 7/8] lib/open: look in MAILDIR for database, as documented. Also user facing is the updates to documentation in [PATCH 8/8] doc: document

Re: question re: https://notmuchmail.org/pipermail/notmuch/2015/021373.html

2021-08-02 Thread Robert Mirbaha
Thank you for the reply David. Having a definitive answer (even if negative) helps. Robert On 02.08.21 03:51, David Bremner wrote: > Robert Mirbaha writes: > >> This patch - https://notmuchmail.org/pipermail/notmuch/2015/021373.html >> - from 2015 did not seem to make it in to the main build.