Re: [PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-27 Thread Michal Sojka
On Mon, 28 Nov 2011, Dmitry Kurochkin wrote: > Hi Daniel. > > On Thu, 24 Nov 2011 15:01:01 +0100, Daniel Schoepe wrote: > > On Thu, 24 Nov 2011 09:54:50 -0400, David Bremner wrote: > > > On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe > > > wrote: > > > > From: Daniel Schoepe > > > > > >

Re: [PATCH v3 00/7] test: (hopefully) better test prerequisites

2011-11-27 Thread David Bremner
On Sun, 27 Nov 2011 22:36:12 +0400, Dmitry Kurochkin wrote: > Changes: > > v3 since v2: > > * rebased the remaining patches on current master These are all pushed to master now. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.o

[PATCH v3 00/7] test: (hopefully) better test prerequisites

2011-11-27 Thread David Bremner
On Sun, 27 Nov 2011 22:36:12 +0400, Dmitry Kurochkin wrote: > Changes: > > v3 since v2: > > * rebased the remaining patches on current master These are all pushed to master now. d

[PATCH 0/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-27 Thread Austin Clements
LGTM

[PATCH v3 7/7] test: fix "Stashing in notmuch-search" test when emacs is not available

2011-11-27 Thread Dmitry Kurochkin
If emacs is not available, test_expect_equal would be called with only one argument. The patch fixes this by quoting the (possibly empty) $(cat OUTPUT) argument. --- test/emacs |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/emacs b/test/emacs index 198c27b..3f8c72d

[PATCH v3 6/7] test: check if emacs is available in the beginning of test_emacs

2011-11-27 Thread Dmitry Kurochkin
Unfortunately, this is needed to avoid the emacs waiting loop. --- test/test-lib.sh |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 2422e32..11e6646 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -894,6 +894,10 @@ EOF

[PATCH v3 5/7] test: add function to explicitly check for external dependencies

2011-11-27 Thread Dmitry Kurochkin
Useful when binary is called indirectly (e.g. from emacs). --- test/test-lib.sh | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index fe80e89..2422e32 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -555,12 +555,26

[PATCH v3 4/7] test: declare external dependencies for the tests

2011-11-27 Thread Dmitry Kurochkin
That are: dtach(1), emacs(1), emacsclient(1), gdb(1) and gpg(1). --- test/test-lib.sh |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 99b9e8b..fe80e89 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1123,3 +1123,10 @

[PATCH v3 3/7] test: skip all subtests if external dependencies are missing during init

2011-11-27 Thread Dmitry Kurochkin
Some tests (e.g. crypto) do a common initialization required for all subtests. The patch adds a check for missing external dependencies during this initialization. If any prerequisites are missing, all subtests are skipped. The check is run on the first call of test_reset_state_ function, so no

[PATCH v3 2/7] test: fix "skipping test" verbose output

2011-11-27 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 0996a74..df867a5 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -657,7 +657,8 @@ test_check_missing_external_prereqs_ () { test_report_skip_ () {

[PATCH v3 1/7] test: add support for external executable dependencies

2011-11-27 Thread Dmitry Kurochkin
There is existing support for general prerequisites in the test suite. But it is not very convenient to use: every test case has to keep track for it's dependencies and they have to be explicitly listed. The patch aims to add better support for a particular type of external dependencies: external

[PATCH v3 00/7] test: (hopefully) better test prerequisites

2011-11-27 Thread Dmitry Kurochkin
Changes: v3 since v2: * rebased the remaining patches on current master v2 since v1: * Add test_require_external_prereq function to explicitly check for external dependencies, use it in test_emacs. * Indenting fixes. * Use $binary instead of $1 in test_declare_external_prereq. Regards, D

[PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread Dmitry Kurochkin
On Sat, 26 Nov 2011 22:14:20 +0100, Amadeusz ?o?nowski wrote: > If symbol-test is built in symbol-hiding with hardcoded g++ invokation, > it's not so easy to pass $(srcdir) which is required to find notmuch.h > when srcdir and builddir are separate directories. > --- > test/.gitignore |1

[PATCH 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-27 Thread Austin Clements
LGTM. We should probably be paying attention to the content disposition, but this is a definite improvement on what we do now. As an interesting side-note, this lets us inline a handful of types that we previously wouldn't, like application/emacs-lisp. On Sat, 26 Nov 2011 05:44:38 +0400, Dmitry

[PATCH 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts

2011-11-27 Thread Austin Clements
LGTM (modulo any changes that propagate from the first patch) On Sat, 26 Nov 2011 05:44:37 +0400, Dmitry Kurochkin wrote: > The patch adds two new test cases: > > * Do not call notmuch for non-inlinable application/mpeg parts > * Do not call notmuch for non-inlinable audio/mpeg parts > > The ap

[PATCH 1/3] test: add functions to count how much times notmuch was called

2011-11-27 Thread Austin Clements
On Sat, 26 Nov 2011 05:44:36 +0400, Dmitry Kurochkin wrote: > The patch adds two auxiliary functions and a variable: > > notmuch_counter_reset > $notmuch_counter > notmuch_counter > > They allow to count how many times notmuch binary is called. > notmuch_counter_reset() function generates

[PATCH 1/2] emacs: remove some code duplication in notmuch-show

2011-11-27 Thread Austin Clements
Both patches look good to me. (I don't think the compiler could warn about the unused `headers' binding even if it wanted to because of dynamic scoping.)

[PATCH 4/4] show: Rewrite show_message_body to use the MIME tree interface.

2011-11-27 Thread Austin Clements
This removes all of the MIME traversal logic from show_message_body and leaves only its interaction with the format callbacks. Besides isolating concerns, since traversal happens behind a trivial interface, there is now much less code duplication in show_message_part. Also, this uses mime_node_se

[PATCH 3/4] Utility function to seek in MIME trees in depth-first order.

2011-11-27 Thread Austin Clements
This function matches how we number parts for the --part argument to show. It will allow us to jump directly to the desired part, rather than traversing the entire tree and carefully tracking whether or not we're "in the zone". --- mime-node.c | 25 + notmuch-client

[PATCH 2/4] Introduce a generic tree-like abstraction for MIME traversal.

2011-11-27 Thread Austin Clements
This wraps all of the complex MIME part handling in a single, simple function that gets part N from *any* MIME object, so traversing a MIME part tree becomes a two-line for loop. Furthermore, the MIME node structure provides easy access to envelopes for message parts as well as cryptographic infor

[PATCH 1/4] show: Pass notmuch_message_t instead of path to show_message_body.

2011-11-27 Thread Austin Clements
In addition to simplifying the code, we'll need the notmuch_message_t* in show_message_body shortly. --- notmuch-client.h |2 +- notmuch-reply.c |3 +-- notmuch-show.c |3 +-- show-message.c |3 ++- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/notmuch-client.

[PATCH 0/4] First step of 'show' rewrite

2011-11-27 Thread Austin Clements
This is the first step in my rewrite of notmuch-show. Currently, MIME traversal is controlled by show_message_body, which invokes formatter callbacks. As a result, formatters have no control over traversal, which complicates formatters and makes others (like raw) nigh impossible to implement corr

Re: [PATCH v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-27 Thread Dmitry Kurochkin
Hi Daniel. On Thu, 24 Nov 2011 15:01:01 +0100, Daniel Schoepe wrote: > On Thu, 24 Nov 2011 09:54:50 -0400, David Bremner wrote: > > On Mon, 10 Oct 2011 15:39:41 +0200, Daniel Schoepe > > wrote: > > > From: Daniel Schoepe > > > > > > This patch makes the notmuch-hello screen fully customizabl

Re: [PATCH 0/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-27 Thread Austin Clements
LGTM ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-27 Thread Dmitry Kurochkin
Before the change, there was a workaround to avoid notmuch show calls for parts with application/* Content-Type. But non-inlinable parts are not limited to this Content-Type (e.g. mp3 files have audio/mpeg Content-Type and are not inlinable). For such parts `notmuch-show-insert-part-*/*' handler

[PATCH 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts

2011-11-27 Thread Dmitry Kurochkin
The patch adds two new test cases: * Do not call notmuch for non-inlinable application/mpeg parts * Do not call notmuch for non-inlinable audio/mpeg parts The application/mpeg test passes thanks to a workaround for application/* Content-Types. The audio/mpeg is currently broken. --- test/emacs

[PATCH 1/3] test: add functions to count how much times notmuch was called

2011-11-27 Thread Dmitry Kurochkin
The patch adds two auxiliary functions and a variable: notmuch_counter_reset $notmuch_counter_command notmuch_counter_value They allow to count how many times notmuch binary is called. notmuch_counter_reset() function generates a script that counts how many times it is called and resets the

[PATCH 0/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-27 Thread Dmitry Kurochkin
This patch series has all comments from Austin's review [1] fixed. Changes in v2 since v1: * Rename $notmuch_counter variable to $notmuch_counter_command. * Rename notmuch_counter() function to notmuch_counter_value(). * Fix documentation for notmuch_counter_value(). * Removed unneeded and add mi

Re: [PATCH 1/3] test: add functions to count how much times notmuch was called

2011-11-27 Thread Dmitry Kurochkin
On Sun, 27 Nov 2011 21:44:23 -0500, Austin Clements wrote: > On Sat, 26 Nov 2011 05:44:36 +0400, Dmitry Kurochkin > wrote: > > The patch adds two auxiliary functions and a variable: > > > > notmuch_counter_reset > > $notmuch_counter > > notmuch_counter > > > > They allow to count how man

Re: [PATCH 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-27 Thread Austin Clements
LGTM. We should probably be paying attention to the content disposition, but this is a definite improvement on what we do now. As an interesting side-note, this lets us inline a handful of types that we previously wouldn't, like application/emacs-lisp. On Sat, 26 Nov 2011 05:44:38 +0400, Dmitry

Re: [PATCH 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts

2011-11-27 Thread Austin Clements
LGTM (modulo any changes that propagate from the first patch) On Sat, 26 Nov 2011 05:44:37 +0400, Dmitry Kurochkin wrote: > The patch adds two new test cases: > > * Do not call notmuch for non-inlinable application/mpeg parts > * Do not call notmuch for non-inlinable audio/mpeg parts > > The a

Re: [PATCH 1/3] test: add functions to count how much times notmuch was called

2011-11-27 Thread Austin Clements
On Sat, 26 Nov 2011 05:44:36 +0400, Dmitry Kurochkin wrote: > The patch adds two auxiliary functions and a variable: > > notmuch_counter_reset > $notmuch_counter > notmuch_counter > > They allow to count how many times notmuch binary is called. > notmuch_counter_reset() function generates

Re: [PATCH 1/2] emacs: remove some code duplication in notmuch-show

2011-11-27 Thread Austin Clements
Both patches look good to me. (I don't think the compiler could warn about the unused `headers' binding even if it wanted to because of dynamic scoping.) ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH 4/4] show: Rewrite show_message_body to use the MIME tree interface.

2011-11-27 Thread Austin Clements
This removes all of the MIME traversal logic from show_message_body and leaves only its interaction with the format callbacks. Besides isolating concerns, since traversal happens behind a trivial interface, there is now much less code duplication in show_message_part. Also, this uses mime_node_se

[PATCH 3/4] Utility function to seek in MIME trees in depth-first order.

2011-11-27 Thread Austin Clements
This function matches how we number parts for the --part argument to show. It will allow us to jump directly to the desired part, rather than traversing the entire tree and carefully tracking whether or not we're "in the zone". --- mime-node.c | 25 + notmuch-client

[PATCH 2/4] Introduce a generic tree-like abstraction for MIME traversal.

2011-11-27 Thread Austin Clements
This wraps all of the complex MIME part handling in a single, simple function that gets part N from *any* MIME object, so traversing a MIME part tree becomes a two-line for loop. Furthermore, the MIME node structure provides easy access to envelopes for message parts as well as cryptographic infor

[PATCH 1/4] show: Pass notmuch_message_t instead of path to show_message_body.

2011-11-27 Thread Austin Clements
In addition to simplifying the code, we'll need the notmuch_message_t* in show_message_body shortly. --- notmuch-client.h |2 +- notmuch-reply.c |3 +-- notmuch-show.c |3 +-- show-message.c |3 ++- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/notmuch-client.

[PATCH 0/4] First step of 'show' rewrite

2011-11-27 Thread Austin Clements
This is the first step in my rewrite of notmuch-show. Currently, MIME traversal is controlled by show_message_body, which invokes formatter callbacks. As a result, formatters have no control over traversal, which complicates formatters and makes others (like raw) nigh impossible to implement corr

[PATCH] dump: Don't sort the output by message id.

2011-11-27 Thread Tom Prince
From: Thomas Schwinge Asking xapian to sort the messages for us causes suboptimal IO patterns. This would be useful, if we only wanted the first few results, but since we want everything anyway, this is pessimization. On 2011-10-29, a measurement on a 372981 messages instance showed that wall ti

[PATCH] dump: Don't sort the output by message id.

2011-11-27 Thread Tom Prince
From: Thomas Schwinge Asking xapian to sort the messages for us causes suboptimal IO patterns. This would be useful, if we only wanted the first few results, but since we want everything anyway, this is pessimization. On 2011-10-29, a measurement on a 372981 messages instance showed that wall ti

[PATCH v3 7/7] test: fix "Stashing in notmuch-search" test when emacs is not available

2011-11-27 Thread Dmitry Kurochkin
If emacs is not available, test_expect_equal would be called with only one argument. The patch fixes this by quoting the (possibly empty) $(cat OUTPUT) argument. --- test/emacs |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/emacs b/test/emacs index 198c27b..3f8c72d

[PATCH v3 6/7] test: check if emacs is available in the beginning of test_emacs

2011-11-27 Thread Dmitry Kurochkin
Unfortunately, this is needed to avoid the emacs waiting loop. --- test/test-lib.sh |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 2422e32..11e6646 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -894,6 +894,10 @@ EOF

[PATCH v3 5/7] test: add function to explicitly check for external dependencies

2011-11-27 Thread Dmitry Kurochkin
Useful when binary is called indirectly (e.g. from emacs). --- test/test-lib.sh | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index fe80e89..2422e32 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -555,12 +555,26

[PATCH v3 4/7] test: declare external dependencies for the tests

2011-11-27 Thread Dmitry Kurochkin
That are: dtach(1), emacs(1), emacsclient(1), gdb(1) and gpg(1). --- test/test-lib.sh |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 99b9e8b..fe80e89 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1123,3 +1123,10 @

[PATCH v3 3/7] test: skip all subtests if external dependencies are missing during init

2011-11-27 Thread Dmitry Kurochkin
Some tests (e.g. crypto) do a common initialization required for all subtests. The patch adds a check for missing external dependencies during this initialization. If any prerequisites are missing, all subtests are skipped. The check is run on the first call of test_reset_state_ function, so no

[PATCH v3 2/7] test: fix "skipping test" verbose output

2011-11-27 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 0996a74..df867a5 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -657,7 +657,8 @@ test_check_missing_external_prereqs_ () { test_report_skip_ () {

[PATCH v3 1/7] test: add support for external executable dependencies

2011-11-27 Thread Dmitry Kurochkin
There is existing support for general prerequisites in the test suite. But it is not very convenient to use: every test case has to keep track for it's dependencies and they have to be explicitly listed. The patch aims to add better support for a particular type of external dependencies: external

[PATCH v3 00/7] test: (hopefully) better test prerequisites

2011-11-27 Thread Dmitry Kurochkin
Changes: v3 since v2: * rebased the remaining patches on current master v2 since v1: * Add test_require_external_prereq function to explicitly check for external dependencies, use it in test_emacs. * Indenting fixes. * Use $binary instead of $1 in test_declare_external_prereq. Regards, D

Re: [PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread Dmitry Kurochkin
On Sat, 26 Nov 2011 22:14:20 +0100, Amadeusz Żołnowski wrote: > If symbol-test is built in symbol-hiding with hardcoded g++ invokation, > it's not so easy to pass $(srcdir) which is required to find notmuch.h > when srcdir and builddir are separate directories. > --- > test/.gitignore |1

Re: [PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread David Bremner
On Sat, 26 Nov 2011 22:14:20 +0100, Amadeusz Żołnowski wrote: > If symbol-test is built in symbol-hiding with hardcoded g++ invokation, > it's not so easy to pass $(srcdir) which is required to find notmuch.h > when srcdir and builddir are separate directories. pushed, d ___

[PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread David Bremner
On Sat, 26 Nov 2011 22:14:20 +0100, Amadeusz ?o?nowski wrote: > If symbol-test is built in symbol-hiding with hardcoded g++ invokation, > it's not so easy to pass $(srcdir) which is required to find notmuch.h > when srcdir and builddir are separate directories. pushed, d

Re: [PATCH v2 03/10] test: add test state reset to test_expect_* functions that did not have it

2011-11-27 Thread David Bremner
On Thu, 17 Nov 2011 17:05:56 +0400, Dmitry Kurochkin wrote: > --- > test/test-lib.sh |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) I pushed the first 3, but the 4th won't apply, even with git am -3 d ___ notmuch mailing list notmuch@

[PATCH v2 03/10] test: add test state reset to test_expect_* functions that did not have it

2011-11-27 Thread David Bremner
On Thu, 17 Nov 2011 17:05:56 +0400, Dmitry Kurochkin wrote: > --- > test/test-lib.sh |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) I pushed the first 3, but the 4th won't apply, even with git am -3 d

[PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread Amadeusz Żołnowski
If symbol-test is built in symbol-hiding with hardcoded g++ invokation, it's not so easy to pass $(srcdir) which is required to find notmuch.h when srcdir and builddir are separate directories. --- test/.gitignore |1 + test/Makefile.local |7 +-- test/basic |2 +- tes

Re: [PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread Amadeusz Żołnowski
Excerpts from Amadeusz Żołnowski's message of 2011-11-26 21:51:21 +0100: > If symbol-test is built in symbol-hiding with hardcoded g++ > invokation, it's not so easy to pass $(srcdir) which is required to > find notmuch.h when srcdir and builddir are separate directories. Sorry, I've just realised

[PATCH] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread Amadeusz Żołnowski
If symbol-test is built in symbol-hiding with hardcoded g++ invokation, it's not so easy to pass $(srcdir) which is required to find notmuch.h when srcdir and builddir are separate directories. --- test/.gitignore |1 + test/Makefile.local |5 - test/basic |2 +- test/

Re: [PATCH 1/2] Build symbol-test with make instead of hardcoding in symbol-hiding.

2011-11-27 Thread David Bremner
On Fri, 25 Nov 2011 11:54:51 +0100, Amadeusz Żołnowski wrote: > If symbol-test is built in symbol-hiding with hardcoded g++ invokation, > it's not so easy to pass $(srcdir) which is required to find notmuch.h > when srcdir and builddir are separate directories. > --- Sorry to do this to you, but

Re: [PATCH 2/2] test: cleanup basic tests

2011-11-27 Thread David Bremner
On Sat, 26 Nov 2011 10:12:26 +0400, Dmitry Kurochkin wrote: > Basic test 'Ensure that all available tests will be run by > notmuch-test' compares all tests that are run with listing of test/ Pushed these two to master. ___ notmuch mailing list notmuch@

Bug fix release 0.10.1 now available

2011-11-27 Thread David Bremner
Where to obtain notmuch 0.10.1 === http://notmuchmail.org/releases/notmuch-0.10.1.tar.gz Which can be verified with: http://notmuchmail.org/releases/notmuch-0.10.1.tar.gz.sha1 0939709a2e60c59656b8e0761ae8bcb38bba2a06 notmuch-0.10.1.tar.gz http://notmuchmail.org/

Re: [PATCH] test: add simple tests for online help

2011-11-27 Thread Jani Nikula
On Fri, 25 Nov 2011 13:36:26 -0500, David Bremner wrote: > I think Jani was just making fun of me when he suggested tests for > notmuch --help, but I thought, why not. Heh, I was only half joking - it is certainly good practice to create tests for any bugs found and fixed. It's a bit embarrassing