[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 10:46:58 +0100, Thomas Jost wrote: > On Thu, 17 Nov 2011 05:56:17 +0400, Dmitry Kurochkin gmail.com> wrote: > > Hi all. > > > > The following patch series is an attempt to introduce proper > > dependencies for external binaries in a less in

[PATCH v2 00/10] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
New version of [1] patch series. Changes: 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, Dmitry

[PATCH v2 01/10] test: move subtest variables reset into a dedicated function

2011-11-17 Thread Dmitry Kurochkin
Currently, there is only one such variable test_subtest_known_broken_. But more will be added in the future. --- test/test-lib.sh | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 1ea7fa9..222b5e4 100755 --- a/test/test-li

[PATCH v2 02/10] test: set EMACS_SERVER variable only after dtach(1) was successfully started

2011-11-17 Thread Dmitry Kurochkin
Otherwise, we can set the EMACS_SERVER and return with an error. And subsequent calls to test_emacs would assume that emacs server is running. --- test/test-lib.sh |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 222b5e4..ff858

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

2011-11-17 Thread Dmitry Kurochkin
--- test/test-lib.sh |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ff85848..f21e45e 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -622,82 +622,85 @@ test_skip () { test_reset_state_ say

[PATCH v2 05/10] test: fix "skipping test" verbose output

2011-11-17 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 625d19b..ce7576a 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -635,41 +635,42 @@ test_skip () { test_report_skip_ "$@"

[PATCH v2 04/10] test: add support for external executable dependencies

2011-11-17 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 v2 06/10] test: skip all subtests if external dependencies are missing during init

2011-11-17 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 v2 07/10] test: declare external dependencies for the tests

2011-11-17 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 4c73437..cf1b4f0 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1101,20 +1101,27

[PATCH v2 08/10] test: add function to explicitly check for external dependencies

2011-11-17 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 cf1b4f0..5a99216 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -533,46 +533,60

[PATCH v2 09/10] test: check if emacs is available in the beginning of test_emacs

2011-11-17 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 5a99216..21e3162 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -872,40 +872,44 @@ expo

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

2011-11-17 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 75a0a74..9883f40

[PATCH 8/9] test: check if emacs is available in the beginning of test_emacs

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 15:13:40 +0400, Dmitry Kurochkin wrote: > On Thu, 17 Nov 2011 11:43:36 +0200, Tomi Ollila wrote: > > On Thu, 17 Nov 2011 05:56:25 +0400, Dmitry Kurochkin > gmail.com> wrote: > > > Unfortunately, this is needed to avoid the emacs waiting loop. > &g

[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
Hi Tomi. On Thu, 17 Nov 2011 14:20:19 +0200, Tomi Ollila wrote: > On Thu, 17 Nov 2011 01:14:07 -0800, Jameson Graef Rollins finestructure.net> wrote: > > > > However, when I tried to test the tests with the patch applied I ran > > into one problem. If I try to run the test suite with dtach > >

[PATCH 0/9] test: (hopefully) better test prerequisites

2011-11-17 Thread Dmitry Kurochkin
On Thu, 17 Nov 2011 16:02:46 +0200, Tomi Ollila wrote: > On Thu, 17 Nov 2011 17:22:41 +0400, Dmitry Kurochkin gmail.com> wrote: > > Hi Tomi. > > > > On Thu, 17 Nov 2011 14:20:19 +0200, Tomi Ollila > > wrote: > > > > > > I.e. dynamic

[PATCH] test: fix sed error in basic tests

2011-11-18 Thread Dmitry Kurochkin
The error is easy to miss, because the test passes and stderr is not printed. But if you run basic tests in verbose mode (./basic --verbose), you get: sed: can't read notmuch-test: No such file or directory The issue is that sed command is given two files: notmuch-test and $TEST_DIRECTORY/notm

[PATCH] emacs: fix `mm-make-handle' content-type parameter

2011-11-18 Thread Dmitry Kurochkin
`notmuch-show-mm-display-part-inline' uses undocumented `mm-make-handle' function. One of the parameters for `mm-make-handle' is charset. Before the change, an unparsed content-type was given to `mm-make-handle' (this was probably copied from Gnus source which uses simple hard-coded values in a s

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-19 Thread Dmitry Kurochkin
Before the change, notmuch used g_mime_content_type_to_string(3) function to output Content-Type header value. Turns out it outputs only "type/subtype" part and ignores all parameters. Also, if there is no Content-Type header, default "text/plain" value is used. JSON is supposed to be a "low-lev

[PATCH] emacs: fix `mm-make-handle' content-type parameter

2011-11-19 Thread Dmitry Kurochkin
Please ignore this patch. Apparently, it is not enough to fix the issue. A proper fix is available in [1]. Regards, Dmitry [1] id:"1321659905-24367-1-git-send-email-dmitry.kurochkin at gmail.com"

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-19 Thread Dmitry Kurochkin
Hi Jamie. On Fri, 18 Nov 2011 17:58:52 -0800, Jameson Graef Rollins wrote: > On Sat, 19 Nov 2011 03:45:05 +0400, Dmitry Kurochkin gmail.com> wrote: > > Before the change, notmuch used g_mime_content_type_to_string(3) > > function to output Content-Type header value. Tu

[PATCH v2] Output unmodified Content-Type header value for JSON format.

2011-11-19 Thread Dmitry Kurochkin
Before the change, notmuch used g_mime_content_type_to_string(3) function to output Content-Type header value. Turns out it outputs only "type/subtype" part and ignores all parameters. Also, if there is no Content-Type header, default "text/plain" value is used. JSON is supposed to be a "low-lev

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-19 Thread Dmitry Kurochkin
On Fri, 18 Nov 2011 23:59:57 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Nov 19 at 6:42 am: > > Hi Jamie. > > > > On Fri, 18 Nov 2011 17:58:52 -0800, Jameson Graef Rollins > finestructure.net> wrote: > > > On Sat, 19 Nov 2011 03:45:05 +0400, Dm

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
Hi Jameson. On Sat, 19 Nov 2011 02:49:43 -0800, Jameson Graef Rollins wrote: > On Sat, 19 Nov 2011 06:42:00 +0400, Dmitry Kurochkin gmail.com> wrote: > > The parameters are there for a reason. They are part of the > > content-type and are needed to handle the body pro

[PATCH v2] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
On Sat, 19 Nov 2011 08:59:29 -0400, David Bremner wrote: > On Sat, 19 Nov 2011 08:18:41 +0400, Dmitry Kurochkin gmail.com> wrote: > > Before the change, notmuch used g_mime_content_type_to_string(3) > > function to output Content-Type header value. Turns out it outputs >

[PATCH] Output unmodified Content-Type header value for JSON format.

2011-11-20 Thread Dmitry Kurochkin
On Sat, 19 Nov 2011 13:58:18 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Nov 19 at 9:26 am: > > On Fri, 18 Nov 2011 23:59:57 -0500, Austin Clements > > wrote: > > > Quoth Dmitry Kurochkin on Nov 19 at 6:42 am: > > > > Hi Jamie. > > >

[PATCH] emacs: Don't record undo information for search or show buffers.

2011-11-21 Thread Dmitry Kurochkin
On Sun, 20 Nov 2011 20:00:55 -0500, Austin Clements wrote: > There's no reason to record undo information for read-only, > programmatically-constructed buffers. The undo list just chews up > memory keeping track of our calls to insert. Makes sense and looks good! Regards, Dmitry > --- > ema

[PATCH] emacs: Avoid unnecessary markers.

2011-11-21 Thread Dmitry Kurochkin
On Sun, 20 Nov 2011 20:07:02 -0500, Austin Clements wrote: > This is just cleanup. These markers are all immediately resolved to > points by Emacs, so using markers here is just unncessary overhead. > --- > I originally did this for performance, since Emacs has to scan all > un-GC'd markers on ev

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

2011-11-26 Thread Dmitry Kurochkin
Add optional props argument to `notmuch-show-get-header'. Use it to get headers in `notmuch-show-insert-part-multipart/signed' and `notmuch-show-insert-part-multipart/encrypted'. --- emacs/notmuch-show.el | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/emacs/notm

[PATCH 2/2] emacs: remove unused variable in `notmuch-show-insert-part-message/rfc822'

2011-11-26 Thread Dmitry Kurochkin
An obvious cleanup. I wonder why there was no warning about this during compilation. --- emacs/notmuch-show.el |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index bcc436f..66c08cc 100644 --- a/emacs/notmuch-show.el +++ b/ema

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

2011-11-26 Thread Dmitry Kurochkin
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 a script that counts how many times it is called and resets the counter to ze

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

2011-11-26 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 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-26 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] test: fix sed error in basic tests

2011-11-26 Thread Dmitry Kurochkin
Ping. Perhaps this is trivial enought to be pushed? Regards, Dmitry

[PATCH 2/2] test: cleanup basic tests

2011-11-26 Thread Dmitry Kurochkin
Basic test 'Ensure that all available tests will be run by notmuch-test' compares all tests that are run with listing of test/ directory. There is a growing list of exceptions for files and directories which located in the test/ directory but are not tests. Moreover some (probably buggy) tests do

[PATCH 1/2] test: remove executable permissions from test-lib.sh

2011-11-26 Thread Dmitry Kurochkin
It is not supposed to be run, only sourced. --- 0 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 test/test-lib.sh diff --git a/test/test-lib.sh b/test/test-lib.sh old mode 100755 new mode 100644 -- 1.7.7.3

[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 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 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 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 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 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 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 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 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 1/3] test: add functions to count how much times notmuch was called

2011-11-28 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 gmail.com> wrote: > > The patch adds two auxiliary functions and a variable: > > > > notmuch_counter_reset > > $notmuch_counter > > no

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

2011-11-28 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

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

2011-11-28 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 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts

2011-11-28 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 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-28 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 v6 1/2] emacs: User-defined sections in notmuch-hello

2011-11-28 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 customi

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

2011-11-28 Thread Dmitry Kurochkin
Hi Jamie. On Mon, 28 Nov 2011 06:24:19 -0800, Jameson Graef Rollins wrote: > On Sat, 26 Nov 2011 02:23:30 +0400, Dmitry Kurochkin gmail.com> wrote: > > -(defun notmuch-show-get-header (header) > > +(defun notmuch-show-get-header (header &optional props) > >&qu

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

2011-11-29 Thread Dmitry Kurochkin
Make some changes suggested by Tomi Ollila [1]. Changes: v3 since v2: * Use read function instead of cat(1) to read counter value. * Add a newline after the count value in state file and notmuch_counter_value() output. v2 since v1: * Rename $notmuch_counter variable to $notmuch_counter_comma

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

2011-11-29 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 v3 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts

2011-11-29 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 v3 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-29 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 1/3] test: add functions to count how much times notmuch was called

2011-11-29 Thread Dmitry Kurochkin
Hi Tomi. On Mon, 28 Nov 2011 22:42:50 +0200, Tomi Ollila wrote: > On Mon, 28 Nov 2011 07:28:13 +0400, Dmitry Kurochkin gmail.com> wrote: > > [...] > > + > > +These allow to count how many times notmuch binary is called. > > +notmuch_counter_reset() fu

[PATCH 4/9] test: add support for external executable dependencies

2011-11-29 Thread Dmitry Kurochkin
On Mon, 28 Nov 2011 23:16:27 +0200, Tomi Ollila wrote: > On Thu, 17 Nov 2011 05:56:21 +0400, Dmitry Kurochkin gmail.com> wrote: > > 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

[PATCH 4/9] test: add support for external executable dependencies

2011-11-29 Thread Dmitry Kurochkin
On Tue, 29 Nov 2011 01:53:49 +0400, Dmitry Kurochkin wrote: > On Mon, 28 Nov 2011 23:16:27 +0200, Tomi Ollila wrote: > > On Thu, 17 Nov 2011 05:56:21 +0400, Dmitry Kurochkin > gmail.com> wrote: > > > There is existing support for general prerequisites in the test suite.

[PATCH 0/4] fix a bunch of bugs in recently added binary dependencies

2011-11-29 Thread Dmitry Kurochkin
Hello. This is a series of trivial but important fixes for the recently added binary dependencies. Special thanks goes to Tomi Ollila who did review of the original patches. Regards, Dmitry

[PATCH 1/4] test: fix test_require_external_prereq()

2011-11-29 Thread Dmitry Kurochkin
test_missing_external_prereq_${binary}_ variable indicates that the binary is missing. It must be set in test_declare_external_prereq() outside of the fake $binary() function. --- test/test-lib.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/te

[PATCH 2/4] test: add missing escape backslash in test_declare_external_prereq()

2011-11-29 Thread Dmitry Kurochkin
--- test/test-lib.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index d7282ff..9dcb2d2 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -557,7 +557,7 @@ test_declare_external_prereq () { test_missing_external_prereq_

[PATCH 3/4] test: fix spurious output from missing external binaries functions

2011-11-29 Thread Dmitry Kurochkin
The grep(1) command used in the fake binary functions was missing the quiet option. --- test/test-lib.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 9dcb2d2..2861d88 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -556

[PATCH 4/4] test: fix error messages for missing binary dependencies

2011-11-29 Thread Dmitry Kurochkin
The fake missing binary functions check if the binary has already be added to the diagnostic message to avoid duplicates. Unfortunately, this check was buggy because the message string does not have the trailing space. --- test/test-lib.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(

[PATCH 4/9] test: add support for external executable dependencies

2011-11-29 Thread Dmitry Kurochkin
On Tue, 29 Nov 2011 02:13:53 +0400, Dmitry Kurochkin wrote: > On Tue, 29 Nov 2011 01:53:49 +0400, Dmitry Kurochkin gmail.com> wrote: > > On Mon, 28 Nov 2011 23:16:27 +0200, Tomi Ollila > > wrote: > > > On Thu, 17 Nov 2011 05:56:21 +0400, Dmitry Kurochkin > > g

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

2011-11-30 Thread Dmitry Kurochkin
Hi Tomi. On Tue, 29 Nov 2011 14:58:00 +0200, Tomi Ollila wrote: > Hi Dmitry. > > On Tue, 29 Nov 2011 01:26:39 +0400, Dmitry Kurochkin gmail.com> wrote: > > Hi Tomi. > > > > On Mon, 28 Nov 2011 22:42:50 +0200, Tomi Ollila > > wrote: > > > On Mon,

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

2011-11-30 Thread Dmitry Kurochkin
Changes: v4 since v3: * Use $(()) instead of expr(1) for math. v3 since v2: * Use read function instead of cat(1) to read counter value. * Add a newline after the count value in state file and notmuch_counter_value() output. v2 since v1: * Rename $notmuch_counter variable to $notmuch_counte

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

2011-11-30 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 v4 3/3] emacs: do not call notmuch show for non-inlinable parts

2011-11-30 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 v4 1/3] test: add functions to count how much times notmuch was called

2011-11-30 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] emacs: Use notmuch-command variable in process-lines.

2011-11-30 Thread Dmitry Kurochkin
+1 Regards, Dmitry

[PATCH] test: cleanup gdb external dependency in atomicity tests

2011-12-02 Thread Dmitry Kurochkin
Change atomicity tests to use the new external binary dependencies. This simplifies the code and makes output consistent. --- test/atomicity | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/test/atomicity b/test/atomicity index ad7d4a3..6df0a00 100755 --- a/test/

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

2011-12-07 Thread Dmitry Kurochkin
Hi David. How about pushing this series? Just a humble ping :) Regards, Dmitry

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

2011-12-07 Thread Dmitry Kurochkin
David, this seems ready for push as well. Regards, Dmitry

[PATCH] debian: add a recommends for w3m-el or w3m-el-snapshot to notmuch-emacs

2011-12-08 Thread Dmitry Kurochkin
Hi David. I am not sure recommending w3m-el is a good idea. It has very annoying bugs with scrolling (C-n): at some point the cursor jumps back above, i.e. it goes in a loop. I did not investigate the issue though. Regards, Dmitry

[PATCH] debian: add a recommends for w3m-el or w3m-el-snapshot to notmuch-emacs

2011-12-08 Thread Dmitry Kurochkin
On Thu, 08 Dec 2011 08:32:12 -0400, David Bremner wrote: > On Thu, 08 Dec 2011 13:33:09 +0400, Dmitry Kurochkin gmail.com> wrote: > > > I am not sure recommending w3m-el is a good idea. It has very annoying > > bugs with scrolling (C-n): at some point the cursor jumps ba

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

2011-12-09 Thread Dmitry Kurochkin
Hi Austin. On Fri, 9 Dec 2011 12:39:13 -0500, Austin Clements wrote: > Just a reminder that this series awaits review and is the first step > in a better, simpler, and cleaner show that will make possible things > like improvements to the JSON format, better encoding handling, proper > raw suppor

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

2011-12-09 Thread Dmitry Kurochkin
On Sun, 4 Dec 2011 14:31:37 -0500, Austin Clements wrote: > 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

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

2011-12-09 Thread Dmitry Kurochkin
On Fri, 9 Dec 2011 14:54:26 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Dec 09 at 11:05 pm: > > On Sun, 4 Dec 2011 14:31:37 -0500, Austin Clements > > wrote: > > > } > > > > > > notmuch_status_t > > > -show_message_b

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

2011-12-10 Thread Dmitry Kurochkin
Hi Austin. +/* The number of children of this part. */ +int children; Consider renaming to children_count or similar to make it clear that it is a counter and not the actual children. +notmuch_bool_t decrypt_success; Perhaps s/decrypt_success/is_decrypted/ for consistency with is_en

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

2011-12-10 Thread Dmitry Kurochkin
On Fri, 9 Dec 2011 14:54:27 -0500, Austin Clements wrote: > 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". >

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

2011-12-11 Thread Dmitry Kurochkin
Hi Austin. I enjoyed reviewing this patch. It is a pleasure to see how complex and confusing code becomes much smaller and cleaner. I still have some questions with the new code. It seems confusing to me that part_content is called first and then go envelope headers. But I this is just the fir

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

2011-12-11 Thread Dmitry Kurochkin
Austin, good job! :) Thanks for this work. (and continue, please :)) Most comments in my review are minor and/or concern the old code (i.e. the new code does not make it worse). Please feel free to ignore them. I vote for pushing this series as soon as Austin finds it appropriate. If Austin mak

[PATCH 1/2] test: add a function to run Python tests

2011-12-11 Thread Dmitry Kurochkin
Hi Thomas. On Wed, 7 Dec 2011 10:46:17 +0100, Thomas Jost wrote: > The new test_python() function makes writing Python tests a little easier: > - it sets the environment variables as needed > - it redirects stdout to the OUTPUT file (like test_emacs()). > > This commit also declares python as

[PATCH] cli: factor out config handling code to get/set lists.

2011-12-11 Thread Dmitry Kurochkin
Hi David. On Sun, 11 Dec 2011 12:07:51 -0400, David Bremner wrote: > From: David Bremner > > Two new internal routines are created _config_get_list and > _config_set_list; the notmuch_config_get_* functions that deal with > lists are simply wrappers for these functions. Looks good to me. Some

[PATCH] util/hex-escape.[ch]: encoding/decoding strings into restricted character set

2011-12-11 Thread Dmitry Kurochkin
On Sun, 11 Dec 2011 12:19:44 -0400, David Bremner wrote: > From: David Bremner > > The character set is chosen to be suitable for pathnames, and the same > as that used by contrib/nmbug. The new encoded/decoded strings are > allocated using talloc. > --- > This isn't urgent, but it is useful for

[PATCH] emacs: support "notmuch new" as a notmuch-poll-script

2011-12-12 Thread Dmitry Kurochkin
Hi Jani. On Sun, 11 Dec 2011 23:48:20 +0200, Jani Nikula wrote: > Let notmuch-poll-script be a function as well as a string. Make default > value nil instead of an empty string, but allow "" for backwards > compatibility. Add a notmuch poll function to call "notmuch new" using the > configured no

[PATCH] emacs: support "notmuch new" as a notmuch-poll-script

2011-12-12 Thread Dmitry Kurochkin
On Mon, 12 Dec 2011 00:19:36 +0200, Jani Nikula wrote: > > Hi Dmitry - > > On Mon, 12 Dec 2011 02:00:45 +0400, Dmitry Kurochkin gmail.com> wrote: > > On Sun, 11 Dec 2011 23:48:20 +0200, Jani Nikula wrote: > > > Let notmuch-poll-script be a function as

[PATCH] emacs: support "notmuch new" as a notmuch-poll-script

2011-12-12 Thread Dmitry Kurochkin
On Sun, 11 Dec 2011 19:31:03 -0500, Austin Clements wrote: > Quoth Jani Nikula on Dec 12 at 1:10 am: > >On Dec 12, 2011 12:56 AM, "Austin Clements" <[1]amdragon at mit.edu> > > wrote: > >> > >> Quoth Dmitry Ku

[PATCH] emacs: support "notmuch new" as a notmuch-poll-script

2011-12-12 Thread Dmitry Kurochkin
On Mon, 12 Dec 2011 12:15:44 +0200, Tomi Ollila wrote: > On Sun, 11 Dec 2011 19:31:03 -0500, Austin Clements > wrote: > > > > So here's another idea, prefaced with a rant. > > > > It's bothered me for a long time that notmuch-emacs didn't just know > > by default how to check for new mail. Wh

[PATCH v2] emacs: support "notmuch new" as a notmuch-poll-script

2011-12-13 Thread Dmitry Kurochkin
Hi Jani. On Mon, 12 Dec 2011 21:57:28 +0200, Jani Nikula wrote: > Support nil value for notmuch-poll-script to run "notmuch new" instead of > an external script, and make this the new default. "notmuch new" is run > using the configured notmuch-command. > > This allows taking better advantage of

[PATCH v3] emacs: support "notmuch new" as a notmuch-poll-script

2011-12-13 Thread Dmitry Kurochkin
On Mon, 12 Dec 2011 22:50:04 +0200, Jani Nikula wrote: > Support nil value for notmuch-poll-script to run "notmuch new" instead of > an external script, and make this the new default. "notmuch new" is run > using the configured notmuch-command. > > This allows taking better advantage of the "notm

[PATCH v3] emacs: support "notmuch new" as a notmuch-poll-script

2011-12-13 Thread Dmitry Kurochkin
On Mon, 12 Dec 2011 16:24:51 -0500, Austin Clements wrote: > Quoth Jani Nikula on Dec 12 at 11:13 pm: > > On Tue, 13 Dec 2011 00:53:05 +0400, Dmitry Kurochkin > gmail.com> wrote: > > > On Mon, 12 Dec 2011 22:50:04 +0200, Jani Nikula > > > wrote: > > >

[PATCH] notmuch: unref charset_filter to fix one memory leak

2011-12-13 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 14:03:33 +0200, Tomi Ollila wrote: > In my use case g_object_unref(charset_filter) reduces memory > consumption over 90% when 'notmuch show --format=text "*"' is > executed (~11000 messages, RES ~330M -> ~25M). > --- > notmuch-show.c |4 +++- > 1 files changed, 3 insertion

[PATCH v3 4/4] emacs: add notmuch-hello-hook

2011-12-13 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 18:32:12 +0100, Thomas Jost wrote: > This hook is called every time the notmuch-hello buffer is updated. > --- > emacs/notmuch-hello.el |9 - > 1 files changed, 8 insertions(+), 1 deletions(-) > > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el > ind

[PATCH] notmuch: unref charset_filter (once more) to fix one memory leak

2011-12-13 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 20:18:48 +0200, tomi.ollila at iki.fi wrote: > From: Tomi Ollila > > In my test case added g_object_unref(charset_filter) reduces memory > consumption over 90% when 'notmuch show --format=text "*"' is > executed (~11000 messages, RES ~330M -> ~25M). > --- > Thanks Dmitry. I di

[PATCH] test: optionally print subtest number

2011-12-14 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 15:56:47 -0400, David Bremner wrote: > From: David Bremner > > The idea is that $test_count could be used in tests to label > intermediate files. The output enabled by this patch (and --debug) > helps figure out which OUTPUT.nn file belongs to which test in case > several sub

[PATCH] test: optionally print subtest number

2011-12-14 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 22:55:18 +0200, Tomi Ollila wrote: > On Wed, 14 Dec 2011 00:15:43 +0400, Dmitry Kurochkin gmail.com> wrote: > > On Tue, 13 Dec 2011 15:56:47 -0400, David Bremner > > wrote: > > > From: David Bremner > > > > > > The idea is tha

[PATCH] test: optionally print subtest number

2011-12-14 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 19:18:16 -0400, David Bremner wrote: > On Tue, 13 Dec 2011 14:22:21 -0800, Jameson Graef Rollins finestructure.net> wrote: > > > I've only been vaguely following this "test count" stuff, but I'm not > > sure I understand what's the point of giving tests a number that is > > u

[PATCH] test: optionally print subtest number

2011-12-14 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 15:35:53 -0800, Jameson Graef Rollins wrote: > On Wed, 14 Dec 2011 03:24:23 +0400, Dmitry Kurochkin gmail.com> wrote: > > BTW I have some plans to introduce optional explicit test ids that can > > be used for inter-test dependencies. E.g.: > > >

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

2011-12-14 Thread Dmitry Kurochkin
Hi Daniel. I have finished reviewing this patch at last. Sorry, it is a bit messy. Overall, I like the patch. It is a very nice improvement. I am sure I have missed some important points, but I guess this is the best I can do right now. Perhaps I will find more comments for the next version of

<    4   5   6   7   8   9   10   11   12   13   >