[PATCH 0/6] Sort by from and subject

2017-09-25 Thread William Casarin
This patch series replaces my original set[1]. I've been using this extensivly for about 3 weeks now and I'm pretty happy with it. I've added the ability to change sort-order on the fly with the O key binding. Main use cases -- * subject sorting: github subscriptions Sorting through

[PATCH 3/6] sorting: update man page

2017-09-25 Thread William Casarin
--- doc/man1/notmuch-address.rst | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst index cc31cc5a..38ae9a25 100644 --- a/doc/man1/notmuch-address.rst +++ b/doc/man1/notmuch-address.rst @@ -77,7 +77,11 @@ Supported o

[PATCH 4/6] emacs: replace oldest-first with sort-order

2017-09-25 Thread William Casarin
This generalizes notmuch-search-oldest-first to notmuch-search-sort-order. notmuch-search-sort-order can now be one of: * oldest-first * newest-first * subject-ascending * subject-descending * from-ascending * from-descending Order toggling now simply inverts the corresponding option.

[PATCH 5/6] emacs: notmuch-search-orders

2017-09-25 Thread William Casarin
Create a notmuch-sort-orders alist to be shared between notmuch-search-sort-orders and notmuch-change-search-order --- emacs/notmuch-lib.el | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index ee7b67d3..16725863

[PATCH 6/6] emacs: add notmuch-search-change-order

2017-09-25 Thread William Casarin
notmuch-search-change-order pops up a completing-read minibuffer completion window for choosing sort-orders. --- emacs/notmuch.el | 14 ++ 1 file changed, 14 insertions(+) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 334458b7..93b4e582 100644 --- a/emacs/notmuch.el +++ b/ema

[PATCH 1/6] sorting: add the ability to sort by from and subject

2017-09-25 Thread William Casarin
* add {from,subject}-{ascending,descending} sort options --- lib/notmuch.h| 16 lib/query.cc | 12 notmuch-search.c | 4 3 files changed, 32 insertions(+) diff --git a/lib/notmuch.h b/lib/notmuch.h index f26565f3..071bfe4d 100644 --- a/lib/notmuch.h +++

[PATCH 2/6] sorting: update ruby bindings for from and subject

2017-09-25 Thread William Casarin
--- bindings/ruby/init.c | 24 1 file changed, 24 insertions(+) diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c index 5556b43e..ace8f666 100644 --- a/bindings/ruby/init.c +++ b/bindings/ruby/init.c @@ -104,6 +104,30 @@ Init_notmuch (void) */ rb_define_

Re: [PATCH 24/24] devel: add script to test out-of-tree builds

2017-09-25 Thread Tomi Ollila
On Tue, Sep 26 2017, Tomi Ollila wrote: >> + >> +set -eu >> + >> +srcdir="$(cd "$(dirname "$0")"/.. && pwd)" > > quotes unnecessary above, but may clarify things... outmost quotes, that is -- e.g. srcdir=$(cd "$(dirname "$0")"/.. && pwd) -- other quotes are necessary > >> +builddir=$(mktemp -d)

Re: [PATCH 24/24] devel: add script to test out-of-tree builds

2017-09-25 Thread Tomi Ollila
On Mon, Sep 25 2017, Jani Nikula wrote: > Something I used for 'git bisect run', but we should really add this > as part of our process. > > Can also be used for running out-of-tree tests with e.g.: > > $ devel/out-of-tree-build-check.sh V=1 test This series looks pretty good (there are some ""-q

Re: [PATCH 5/6] cli/new: support // in new.ignore

2017-09-25 Thread David Bremner
Jani Nikula writes: > + A regular expression delimited with // that will be matched > + against the path of the file or directory relative to the > + database path. The beginning and end of string must be > + explictly anchored. For example, /.*/foo$/ would match > +

Re: [PATCH 0/9] argument parsing fixes and improvements

2017-09-25 Thread David Bremner
Daniel Kahn Gillmor writes: > On Mon 2017-09-25 08:34:13 -0300, David Bremner wrote: >> I think there is two different discussions one could be having here; one >> about the UI, the other about the implimentation. >> >> From the UI point of view, > > Are you using the term "UI" to mean "API" here

[PATCH 24/24] devel: add script to test out-of-tree builds

2017-09-25 Thread Jani Nikula
Something I used for 'git bisect run', but we should really add this as part of our process. Can also be used for running out-of-tree tests with e.g.: $ devel/out-of-tree-build-check.sh V=1 test --- devel/out-of-tree-build-check.sh | 16 1 file changed, 16 insertions(+) create

[PATCH 20/24] test: use source and build paths in T4?0-emacs-*.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T440-emacs-hello.sh | 2 +- test/T450-emacs-show.sh | 2 +- test/T460-emacs-tree.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/T440-emacs-hello.sh b/test/T440-emacs-hello.sh index 76e795937c6c..d23

[PATCH 17/24] test: use source and build paths in T355-smime.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T355-smime.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/T355-smime.sh b/test/T355-smime.sh index b813b6cad2e5..1523f17b9f6f 100755 --- a/test/T355-smime.sh +++ b/test/T355-smime.sh @@ -10,7 +10

[PATCH 15/24] test: use source and build paths in T310-emacs.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T310-emacs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index b8a89a4ac4c9..7f1c75630ca9 100755 --- a/test/T310-emacs.sh +++ b/test/T310-emacs.sh @@ -3,13 +3,13 @

[PATCH 23/24] build: don't copy the test directory for out-of-tree builds

2017-09-25 Thread Jani Nikula
It should now work without. --- configure | 4 1 file changed, 4 deletions(-) diff --git a/configure b/configure index c0a550c7f9fd..d3e30b53ea51 100755 --- a/configure +++ b/configure @@ -40,10 +40,6 @@ if [ "$srcdir" != "." ]; then cp "$srcdir"/"$dir"/Makefile "$dir" done -

[PATCH 21/24] test: use source and build paths in T480-hex-escaping.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T480-hex-escaping.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T480-hex-escaping.sh b/test/T480-hex-escaping.sh index 28564c3c9da2..2c5bbb631305 100755 --- a/test/T480-hex-escaping.sh +++ b/test/T4

[PATCH 22/24] test: use source and build paths in T590-thread-breakage.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T590-thread-breakage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T590-thread-breakage.sh b/test/T590-thread-breakage.sh index 53932d63effe..aeb82cf4e3f3 100755 --- a/test/T590-thread-breakage.sh +

[PATCH 18/24] test: use source and build paths in T360-symbol-hiding.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T360-symbol-hiding.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh index 68edc2d3a7ab..43921cb4a275 100755 --- a/test/T360-symbol-hiding.sh +++ b/tes

[PATCH 19/24] test: use source and build paths in T380-atomicity.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- 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 17a3e478aeca..45de22284cb8 100755 --- a/test/T380-atomicity.sh +++ b/test/T380-atomicity.sh

[PATCH 13/24] test: use source and build paths in T160-json.sh and T170-sexp.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T160-json.sh | 4 ++-- test/T170-sexp.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/T160-json.sh b/test/T160-json.sh index 765b78a6746d..91b98e5d6bdc 100755 --- a/test/T160-json.sh +++ b/test/T160-

[PATCH 14/24] test: use source and build paths in T260-thread-order.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T260-thread-order.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/T260-thread-order.sh b/test/T260-thread-order.sh index 7f71ce097eb5..fea612757c41 100755 --- a/test/T260-thread-order.sh +++ b/test/T260-t

[PATCH 16/24] test: use source and build paths in T350-crypto.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T350-crypto.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh index 0e19bd08f7f3..ef3b5ec6ff18 100755 --- a/test/T350-crypto.sh +++ b/test/T350-crypto.sh @@ -14,7 +14,7

[PATCH 12/24] test: use source and build paths in T000-basic.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/T000-basic.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/T000-basic.sh b/test/T000-basic.sh index f3808c0753a2..7fbdcfa3036c 100755 --- a/test/T000-basic.sh +++ b/test/T000-basic.sh @@ -32,19 +32,

[PATCH 11/24] test: use source and build paths in notmuch-test

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/notmuch-test | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/test/notmuch-test b/test/notmuch-test index 9d9df7dfedbe..ca68dd416cfc 100755 --- a/test/notmuch-test +++ b/test/notmuch-test

[PATCH 07/24] test: use source and build paths in test-lib.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- test/test-lib.sh | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index e3b40f21743d..5ccae7aea28b 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -2

[PATCH 06/24] test: add a script to figure out source and build directories

2017-09-25 Thread Jani Nikula
Expect the tests to be run somewhere in the build directory hierarchy. Allow for source and build directories to be passed through the environment. --- test/export-dirs.sh | 32 1 file changed, 32 insertions(+) create mode 100644 test/export-dirs.sh diff --git a/

[PATCH 08/24] perf-test: use source and build paths in perf-test-lib.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. --- performance-test/perf-test-lib.sh | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh index c89d5aab39a0..56538abddcdb 100644 --- a/perfo

[PATCH 10/24] test: mkdir and cd to $TMP_DIRECTORY instead of $test for testing

2017-09-25 Thread Jani Nikula
$TMP_DIRECTORY is a full path, while $test is not. --- test/test-lib-common.sh | 1 - test/test-lib.sh| 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh index 5133917dae9a..5e53348a9438 100644 --- a/test/test-lib-common.s

[PATCH 09/24] test: use source and build paths in test-lib-common.sh

2017-09-25 Thread Jani Nikula
Make a distinction between source and build directories. The expectation is that anyone sourcing test-lib-common.sh has sourced export-dirs.sh. --- test/test-lib-common.sh | 43 +++ 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/test/test-l

[PATCH 05/24] test: check for notmuch binary in test-lib.sh

2017-09-25 Thread Jani Nikula
Move notmuch executable check into common code. Redundant for notmuch-test runs, but works also for individual tests. --- test/T000-basic.sh | 10 -- test/test-lib.sh | 7 +++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/test/T000-basic.sh b/test/T000-basic.sh ind

[PATCH 02/24] build: use NOTMUCH_SRCDIR for referencing notmuch-test

2017-09-25 Thread Jani Nikula
Don't assume the tests are always run from within the source tree. --- test/Makefile.local | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Makefile.local b/test/Makefile.local index 0df72c921654..1a0ab813f996 100644 --- a/test/Makefile.local +++ b/test/Makefile.local

[PATCH 03/24] test: use $(dirname "$0") for sourcing test-lib.sh

2017-09-25 Thread Jani Nikula
Don't assume the tests are always run from within the source tree. --- test/T000-basic.sh| 2 +- test/T010-help-test.sh| 2 +- test/T020-compact.sh | 2 +- test/T030-config.sh | 2 +- test/T040-s

[PATCH 04/24] perf-test: use $(dirname "$0") for sourcing perf-test-lib.sh

2017-09-25 Thread Jani Nikula
Don't assume the tests are always run from within the source tree. --- performance-test/M00-new.sh | 2 +- performance-test/M01-dump-restore.sh | 2 +- performance-test/M02-show.sh | 2 +- performance-test/M03-search.sh | 2 +- performance-test/M04-reply.sh| 2 +- pe

[PATCH 01/24] test: use corpora/default not corpus in T480-hex-escaping.sh

2017-09-25 Thread Jani Nikula
Turns out round trip tests didn't really round trip anything. Broken by yours truly in 971cdc72cdb8 ("test: make it possible to have multiple corpora"). Ooops. --- test/T480-hex-escaping.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T480-hex-escaping.sh b/test/T48

[PATCH 00/24] test: separate source and build directories

2017-09-25 Thread Jani Nikula
This lengthy but mostly mechanical series separates all source and build directory references in the test framework to be able to properly build and run out-of-tree tests. At the end, the 'cp -a' of the test directory from source to build can be dropped. The general idea is that you have current w

Re: notmuch-emacs: Fcc to top-level directory given by database.path

2017-09-25 Thread Tomi Ollila
On Sun, Sep 24 2017, David Bremner wrote: > Arun Isaac writes: > >>> In any case I've noted your feature request/bug-report. It doesn't sound >>> terribly difficult to change, but it will need someone motivated to >>> think about all of the related details like updating the test suite and >>> cha

Re: [PATCH 0/9] argument parsing fixes and improvements

2017-09-25 Thread Daniel Kahn Gillmor
On Mon 2017-09-25 08:34:13 -0300, David Bremner wrote: > I think there is two different discussions one could be having here; one > about the UI, the other about the implimentation. > > From the UI point of view, Are you using the term "UI" to mean "API" here? i tend to think of "UI" as the CLI i

Re: [PATCH 0/9] argument parsing fixes and improvements

2017-09-25 Thread David Bremner
Jani Nikula writes: > On Wed, 20 Sep 2017, Daniel Kahn Gillmor wrote: >> right, about the defaults: as i'm sure you're aware, i'm trying to >> introduce some boolean options whose default is "unset", meaning "do >> whatever is set in the database config". In particular, --try-decrypt >> (for th