[PATCH] emacs: Use notmuch-command variable in process-lines.

2011-11-29 Thread Jani Nikula
Good catch, looks good to me. BR, Jani. On Tue, 29 Nov 2011 10:58:31 -0700, Chris Gray wrote: > The process-lines function calls the notmuch binary. The location of > the binary may have been customized by the user, so it is better to > use the customized location rather than allowing the proc

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

2011-11-29 Thread Jani Nikula
Hi, generally looks good to me, but please find a few comments below. BR, Jani. On Sun, 27 Nov 2011 21:21:09 -0500, Austin Clements wrote: > 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

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

2011-11-29 Thread Tomi Ollila
LGTM On Tue, 29 Nov 2011 02:41:07 +0400, Dmitry Kurochkin wrote: > 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. >

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

2011-11-29 Thread Tomi Ollila
Hi Dmitry. On Tue, 29 Nov 2011 01:26:39 +0400, Dmitry Kurochkin wrote: > 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: [ ... ] > > > +# Creates a script that counts how much time it is executed a

Re: [PATCH] emacs: Use notmuch-command variable in process-lines.

2011-11-29 Thread Dmitry Kurochkin
+1 Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v4 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 v4 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 v4 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 v4 0/3] emacs: do not call notmuch show for non-inlinable parts

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

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

2011-11-29 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 > wrote: > > 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 > > > wrote:

Re: [PATCH] emacs: Use notmuch-command variable in process-lines.

2011-11-29 Thread Jani Nikula
Good catch, looks good to me. BR, Jani. On Tue, 29 Nov 2011 10:58:31 -0700, Chris Gray wrote: > The process-lines function calls the notmuch binary. The location of > the binary may have been customized by the user, so it is better to > use the customized location rather than allowing the proc

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

2011-11-29 Thread Jani Nikula
Hi, generally looks good to me, but please find a few comments below. BR, Jani. On Sun, 27 Nov 2011 21:21:09 -0500, Austin Clements wrote: > 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

[PATCH] emacs: Use notmuch-command variable in process-lines.

2011-11-29 Thread Chris Gray
The process-lines function calls the notmuch binary. The location of the binary may have been customized by the user, so it is better to use the customized location rather than allowing the process-lines function to search the user's PATH for the binary. --- emacs/notmuch.el |2 +- 1 files ch

[PATCH] emacs: Use notmuch-command variable in process-lines.

2011-11-29 Thread Chris Gray
The process-lines function calls the notmuch binary. The location of the binary may have been customized by the user, so it is better to use the customized location rather than allowing the process-lines function to search the user's PATH for the binary. --- emacs/notmuch.el |2 +- 1 files ch

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

2011-11-29 Thread Jameson Graef Rollins
.. Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/2029/20e68ff5/attachment.pgp>

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

2011-11-29 Thread Jameson Graef Rollins
ubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/2029/3861532d/attachment.pgp>

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

2011-11-29 Thread Tomi Ollila
LGTM On Tue, 29 Nov 2011 02:41:07 +0400, Dmitry Kurochkin wrote: > 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. >

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

2011-11-29 Thread Jameson Graef Rollins
On Tue, 29 Nov 2011 01:26:39 +0400, Dmitry Kurochkin wrote: > > echo \$((count + 1)) > "$notmuch_counter_state_path" > > I do not think this is really an optimization. And I find expr more > clear than using $(()). I always have troubles remembering "random > special char syntax" (yeah, not a

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

2011-11-29 Thread Jameson Graef Rollins
On Sun, 27 Nov 2011 21:21:07 -0500, Austin Clements wrote: > This is the first step in my rewrite of notmuch-show. Hey, Austin. Thank you so much for working on this! This is some really awesome work (as usual). I unfortunately don't have time to play with this at the moment, but I'm very exci

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

2011-11-29 Thread Tomi Ollila
Hi Dmitry. On Tue, 29 Nov 2011 01:26:39 +0400, Dmitry Kurochkin wrote: > 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 > > wrote: [ ... ] > > > +# Creates a script that counts how much time it is executed and call

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

2011-11-29 Thread David Bremner
On Sun, 27 Nov 2011 13:40:53 -0500, Tom Prince wrote: > 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. Pushed. d __

[PATCH 1/2] test/symbol-hiding: add some whitespace between tests

2011-11-29 Thread David Bremner
This is in preparation for adding a third test to this file --- test/symbol-hiding |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/test/symbol-hiding b/test/symbol-hiding index f67b653..6d4e4ff 100755 --- a/test/symbol-hiding +++ b/test/symbol-hiding @@ -19,7 +19,9 @@ out

[PATCH 2/2] test/symbol-hiding: compare exported symbols with existing one

2011-11-29 Thread David Bremner
We assume that any symbol starting with notmuch_ in lib/*.o should be exported, and that only those symbols should be exported. --- test/symbol-hiding |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/test/symbol-hiding b/test/symbol-hiding index 6d4e4ff..68f0d1b 100755

New test for exported symbols

2011-11-29 Thread David Bremner
As long promised, here is a test to compare the list of symbols retrieved with objdump to those from notmuch.sym I didn't verify whether this runs properly during out of tree builds. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.or

Re: [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 > wrote: > > On Mon, 28 Nov 2011 23:16:27 +0200, Tomi Ollila wrote: > > > On Thu, 17 Nov 2011 05:56:21 +0400, Dmitry Kurochkin > > > wrote: > > > > There is existing support for

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

2011-11-29 Thread Austin Clements
Quoth Jameson Graef Rollins on Nov 28 at 6:24 am: > On Sat, 26 Nov 2011 02:23:30 +0400, Dmitry Kurochkin > wrote: > > -(defun notmuch-show-get-header (header) > > +(defun notmuch-show-get-header (header &optional props) > >"Return the named header of the current message, if any." > > - (pli

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

2011-11-29 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 > wrote: > > -(defun notmuch-show-get-header (header) > > +(defun notmuch-show-get-header (header &optional props) > >"Return the named header of the current me

Re: [PATCH v2] tag: Automatically limit to messages whose tags will actually change.

2011-11-29 Thread David Bremner
On Wed, 9 Nov 2011 08:44:35 -0500, Austin Clements wrote: > This optimizes the user's tagging query to exclude messages that won't > be affected by the tagging operation, saving computation and IO for > redundant tagging operations. Pushed, d ___ not

[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 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 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 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 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 ___ notmuch mailing list notmuch@notmuchmail.org http://not

Re: [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 > > wrote: > > > There is existing support for general prerequisites in the test suite. > > > But it is not very conveni

Re: [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 > 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 > > track for it's dependencies

Re: [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 > wrote: > > [...] > > + > > +These allow to count how many times notmuch binary is called. > > +notmuch_counter_reset() function generates a script that counts > > +

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

2011-11-29 Thread Tomi Ollila
On Thu, 17 Nov 2011 05:56:21 +0400, Dmitry Kurochkin 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 > track for it's dependencies and they have to be explicitly listed. > > The patch aims to add

[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 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 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 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

Re: [PATCH] dump: Don't sort.

2011-11-29 Thread Thomas Schwinge
Hi! First, thanks to David, Tomi, Tom for moving this forward. On Sat, 19 Nov 2011 16:11:13 +0100, Petter Reinholdtsen wrote: > [Thomas Schwinge] > > +/* This used to use NOTMUCH_SORT_MESSAGE_ID. On 2011-10-29, a > > measurement > > + * on a 372981 messages instance showed that wall t

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

2011-11-29 Thread Tomi Ollila
On Mon, 28 Nov 2011 07:28:13 +0400, Dmitry Kurochkin wrote: [...] > + > +These 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 zero. The > +functio

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

2011-11-29 Thread Jameson Graef Rollins
On Mon, 28 Nov 2011 13:28:55 -0500, Austin Clements wrote: > If props isn't provided, it'll be nil, so notmuch-show-get-prop will > also interpret its optional props argument as not being provided. On Mon, 28 Nov 2011 22:11:43 +0400, Dmitry Kurochkin wrote: > If props is not supplied it is boun

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

2011-11-29 Thread Jani Nikula
On Sun, 27 Nov 2011 21:21:11 -0500, Austin Clements wrote: > Since this is a rewrite, the diff is not very enlightening. It's > easier to look at the old code and the new code side-by-side. Hi Austin, try the git format-patch --break-rewrites option. It works nicely on patches like this. See bel

Re: Incorrect parsing of email addresses (MIME with quotes)

2011-11-29 Thread Petter Reinholdtsen
[David Bremner] > Notmuch is accepting the input, it just isn't displaying it the way > you want. Well, I guess that is mostly a question of semantics and definitions. To me it isn't really accepting the input when I try to reply to an email with the problem in question and end up with On Mon,

[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 > > gmail.com> wrote: > > > > There is

[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 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 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 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 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 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. > > > But it is not very

[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 > > track for it's depen

[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() function generates a script that count

[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 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 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 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