Re: [PATCH] test: don't bail out of `run_emacs' too early when missing prereqs

2012-01-12 Thread Dmitry Kurochkin
On Thu, 12 Jan 2012 18:16:59 +0100, Pieter Praet wrote: > When running the Emacs tests in verbose mode, only the first missing > prereq is reported because the `run_emacs' function is short-circuited > early: > > #+begin_example > emacs: Testing emacs interface > missing prerequisites:

Re: [PATCH] emacs: globally replace non-branching "(if (not ..." with "(unless ..."

2012-01-12 Thread Dmitry Kurochkin
On Thu, 12 Jan 2012 18:33:06 +0100, Pieter Praet wrote: > Less code, same results, without sacrificing readability. > +1 Regards, Dmitry > --- > emacs/notmuch-address.el |6 +++--- > emacs/notmuch-hello.el | 20 ++-- > emacs/notmuch-show.el| 12 ++-- >

Re: [PATCH] test: don't bail out of `run_emacs' too early when missing prereqs

2012-01-15 Thread Dmitry Kurochkin
On Sat, 14 Jan 2012 10:09:37 +0100, Pieter Praet wrote: > When running the Emacs tests in verbose mode, only the first missing > prereq is reported because the `run_emacs' function is short-circuited > early: > > #+begin_example > emacs: Testing emacs interface > missing prerequisites:

Re: [PATCH] test: don't bail out of `run_emacs' too early when missing prereqs

2012-01-15 Thread Dmitry Kurochkin
On Sat, 14 Jan 2012 10:07:41 +0100, Pieter Praet wrote: > On Thu, 12 Jan 2012 21:34:29 +0400, Dmitry Kurochkin > wrote: > > On Thu, 12 Jan 2012 18:16:59 +0100, Pieter Praet wrote: > > > When running the Emacs tests in verbose mode, only the first missing > > >

Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread Dmitry Kurochkin
On Mon, 16 Jan 2012 11:35:37 +, David Edmondson wrote: > On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin > wrote: > > Before the change, there were two ways to do search in Emacs UI: > > search widget in notmuch-hello buffer and `notmuch-search' > > funct

Re: [PATCH 1/2] test: Add "test_expect_emacs_t" to assist with emacs testing.

2012-01-16 Thread Dmitry Kurochkin
Hi David. On Mon, 16 Jan 2012 16:47:32 +, David Edmondson wrote: > "test_expect_emacs_t" expects a single argument. If this is `t' then > the test passes. Otherwise the argument provides the details of the > test failure to be reported. Isn't this function the same as something like "test_ex

Re: [PATCH] Document the dependency on dtach in the test suite

2012-01-16 Thread Dmitry Kurochkin
On Mon, 16 Jan 2012 12:16:08 -0500, Ethan Glasser-Camp wrote: > From: Ethan Glasser-Camp > > dtach (and before that, screen) are used to run emacs with more > verisimilitude, but this is only mentioned in the NEWS. Mention this > in the test/README file, to make it easier to find out why a bunc

Re: [PATCH v5 1/5] cli: slightly refactor "notmuch reply" address scanning functions

2012-01-16 Thread Dmitry Kurochkin
Hello. Since this patches got in, I have yet to send a single email to the address(es) I intend to :( I am really used to the bindings and this change is a pain. From IRC discussion, it seems like I am not alone here. There was a proposal to change reply bindings to 'ra' and 'rs'. When 'r' is p

Re: [PATCH 1/4] test: Add `test_emacs_expect_t'.

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 12:52:25 +, David Edmondson wrote: > Add a new test function to allow simpler testing of emacs > functionality. > > `test_emacs_expect_t' takes two arguments: > - the name of the test, > - some lisp to evaluate. > > The test passes if the lisp returns `t', otherwise i

Re: [PATCH 2/4] test: Add address cleaning tests.

2012-01-17 Thread Dmitry Kurochkin
> +'(load "address-cleaning.el") (notmuch-test-address-cleaning-'$i')' > +done > + > +test_done > diff --git a/test/notmuch-test b/test/notmuch-test > index d034f99..7768c32 100755 > --- a/test/notmuch-test > +++ b/test/notmuch-test >

[PATCH 1/2] emacs: add invisible dot instead of space at the end of notmuch-hello search box

2012-01-17 Thread Dmitry Kurochkin
This makes `show-trailing-whitespace' happy, i.e. it does not mark the whole search box line as trailing spaces. Since the dot is invisible, this change makes no visible difference for `notmuch-hello'. --- emacs/notmuch-hello.el |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 2/2] emacs: fix typo in notmuch-hello

2012-01-17 Thread Dmitry Kurochkin
--- emacs/notmuch-hello.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index a71f3ce..aed1fb3 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -509,7 +509,7 @@ Complete list of currently available key

Re: [PATCH 1/2] emacs: add invisible dot instead of space at the end of notmuch-hello search box

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 14:08:58 +, David Edmondson wrote: > On Tue, 17 Jan 2012 17:24:45 +0400, Dmitry Kurochkin > wrote: > > This makes `show-trailing-whitespace' happy, i.e. it does not mark the > > whole search box line as trailing spaces. > > Why should `

Re: [PATCH 1/3] test: Don't return the result of checking for running emacs to the tester.

2012-01-17 Thread Dmitry Kurochkin
Can you please elaborate why this is needed? Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 14:07:03 +, David Edmondson wrote: > Add a new test function to allow simpler testing of emacs > functionality. > > `test_emacs_expect_t' takes one argument - a list expression to > evaluate. The test passes if the expression returns `t', otherwise it > fails and the outpu

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 14:35:07 +, David Edmondson wrote: > On Tue, 17 Jan 2012 18:26:41 +0400, Dmitry Kurochkin > wrote: > > Sorry, I still do not understand why we can not implement > > test_emacs_expect_t() like: > > > > result=${test_emacs $@} >

Re: [PATCH 1/3] test: Don't return the result of checking for running emacs to the tester.

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 14:37:52 +, David Edmondson wrote: > (And for the list...) > > On Tue, 17 Jan 2012 18:20:04 +0400, Dmitry Kurochkin > wrote: > > Can you please elaborate why this is needed? > > This code: > > # wai

[PATCH v2] emacs: add invisible dot instead of space at the end of notmuch-hello search box

2012-01-17 Thread Dmitry Kurochkin
This makes `show-trailing-whitespace' happy, i.e. it does not mark the whole search box line as trailing spaces. Since the dot is invisible, this change makes no visible difference for `notmuch-hello'. --- emacs/notmuch-hello.el |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-)

[PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello buffer

2012-01-17 Thread Dmitry Kurochkin
Before the change, "s" in notmuch-hello buffer would jump to the search box. The patch changes the binding to `notmuch-search' which is consistent with all other notmuch buffers. --- emacs/notmuch-hello.el | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a

[PATCH 2/3] emacs: use a single history for all searches

2012-01-17 Thread Dmitry Kurochkin
There are two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Before the change, these search mechanisms used different history lists. The patch makes notmuch-hello search use the same history list as `notmuch-search' function. ---

[PATCH 3/3] emacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer

2012-01-17 Thread Dmitry Kurochkin
`notmuch-hello-search' uses `notmuch-search' function but refreshes notmuch-hello buffer when the search buffer is closed. --- emacs/notmuch-hello.el |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index cb36977..e908659

Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-17 Thread Dmitry Kurochkin
Hello. On Mon, 16 Jan 2012 12:21:20 +, Jani Nikula wrote: > On Mon, 16 Jan 2012 15:39:14 +0400, Dmitry Kurochkin > wrote: > > On Mon, 16 Jan 2012 11:35:37 +, David Edmondson wrote: > > > On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin > > > wr

Re: [PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello buffer

2012-01-17 Thread Dmitry Kurochkin
[of course I sent this email privately, sorry for duplicates] On Tue, 17 Jan 2012 23:22:30 +0200, Jani Nikula wrote: > On Tue, 17 Jan 2012 23:34:08 +0400, Dmitry Kurochkin > wrote: > > Before the change, "s" in notmuch-hello buffer would jump to the > > search

Re: [PATCH 2/3] emacs: use a single history for all searches

2012-01-18 Thread Dmitry Kurochkin
On Wed, 18 Jan 2012 08:25:22 +, David Edmondson wrote: > On Tue, 17 Jan 2012 23:34:09 +0400, Dmitry Kurochkin > wrote: > > There are two ways to do search in Emacs UI: search widget in > > notmuch-hello buffer and `notmuch-search' function bound to "s". &g

Re: [PATCH v2] emacs: Make the part content available to the mm-inline* checks.

2012-01-18 Thread Dmitry Kurochkin
Hi David. On Wed, 18 Jan 2012 17:39:31 +, David Edmondson wrote: > The `mm-inlinable-p' and `mm-inlined-p' functions work better if they > have access to the data of the relevant part, so load that content > before calling either function. > > This fixes the display of attached image/jpeg pa

Re: [PATCH v2] emacs: Make the part content available to the mm-inline* checks.

2012-01-18 Thread Dmitry Kurochkin
On Wed, 18 Jan 2012 18:30:36 +, David Edmondson wrote: > On Wed, 18 Jan 2012 22:04:36 +0400, Dmitry Kurochkin > wrote: > > On Wed, 18 Jan 2012 17:39:31 +, David Edmondson wrote: > > > The `mm-inlinable-p' and `mm-inlined-p' functions work better if they &

Re: [PATCH v2] emacs: Make the part content available to the mm-inline* checks.

2012-01-18 Thread Dmitry Kurochkin
On Wed, 18 Jan 2012 14:35:01 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jan 18 at 11:00 pm: > > On Wed, 18 Jan 2012 18:30:36 +, David Edmondson wrote: > > > On Wed, 18 Jan 2012 22:04:36 +0400, Dmitry Kurochkin > > > wrote: > > > > On

[PATCH v2 0/3] emacs: notmuch-hello search cleanup

2012-01-18 Thread Dmitry Kurochkin
Changes in v2 since v1: * expected results changes for tests moved from patch 2 to 1 where it belong Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v2 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello buffer

2012-01-18 Thread Dmitry Kurochkin
Before the change, "s" in notmuch-hello buffer would jump to the search box. The patch changes the binding to `notmuch-search' which is consistent with all other notmuch buffers. --- emacs/notmuch-hello.el | 19 ++- test/emacs.expected-output/notmuch-

[PATCH v2 3/3] emacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer

2012-01-18 Thread Dmitry Kurochkin
`notmuch-hello-search' uses `notmuch-search' function but refreshes notmuch-hello buffer when the search buffer is closed. --- emacs/notmuch-hello.el |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index cb36977..e908659

[PATCH v2 2/3] emacs: use a single history for all searches

2012-01-18 Thread Dmitry Kurochkin
There are two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Before the change, these search mechanisms used different history lists. The patch makes notmuch-hello search use the same history list as `notmuch-search' function. ---

Re: [PATCH 0/3] Second step of 'show' rewrite

2012-01-18 Thread Dmitry Kurochkin
Hi Austin. On Wed, 18 Jan 2012 15:28:24 -0500, Austin Clements wrote: > This adds support for self-recursive message formatters, while > maintaining backwards compatibility with old style formatters. After > this, each format can be converted to the new style individually and, > once they're all

Re: [PATCH v2] emacs: Make the part content available to the mm-inline* checks.

2012-01-19 Thread Dmitry Kurochkin
On Thu, 19 Jan 2012 07:39:32 +, David Edmondson wrote: > On Wed, 18 Jan 2012 23:00:15 +0400, Dmitry Kurochkin > wrote: > > > That would allow a sane default (("image/*" "text/*") perhaps), but also > > > allow more to be added to that list (or so

Re: [PATCH] emacs: Make the part content available to `mm-inlinable-p'.

2012-01-19 Thread Dmitry Kurochkin
[and again with reply to all] On Thu, 19 Jan 2012 09:34:07 +, David Edmondson wrote: > The `mm-inlinable-p' function works better if it has access to the > data of the relevant part, so load that content before calling it. > > Don't load the content for parts that the user has indicated no d

Re: [PATCH] emacs: fix tests wrt notmuch-hello invisible dot

2012-01-19 Thread Dmitry Kurochkin
On Thu, 19 Jan 2012 22:31:14 +0100, Pieter Praet wrote: > Not meant to be applied! > > Should be merged into > id:"1326815734-20421-1-git-send-email-dmitry.kuroch...@gmail.com" > Oops. I managed to miss the failing tests. I would send a new patch version. Regards, Dmitry > --- > test/e

Re: [PATCH] emacs: fix tests wrt notmuch-hello invisible dot

2012-01-19 Thread Dmitry Kurochkin
On Fri, 20 Jan 2012 00:50:49 +0100, Pieter Praet wrote: > On Fri, 20 Jan 2012 02:37:30 +0400, Dmitry Kurochkin > wrote: > > On Thu, 19 Jan 2012 22:31:14 +0100, Pieter Praet wrote: > > > Not meant to be applied! > > > > > > Should be merged into > &

Re: [PATCH 1/3] test: Don't return the result of checking for running emacs to the tester.

2012-01-24 Thread Dmitry Kurochkin
LGTM. Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-24 Thread Dmitry Kurochkin
On Thu, 19 Jan 2012 12:54:02 +, David Edmondson wrote: > Add a new test function to allow simpler testing of emacs > functionality. > > `test_emacs_expect_t' takes one argument - a list expression to > evaluate. The test passes if the expression returns `t', otherwise it > fails and the outpu

Re: [PATCH 3/3] test: Add address cleaning tests.

2012-01-24 Thread Dmitry Kurochkin
subtest "notmuch-test-address-clean-$i" > +test_emacs_expect_t \ > + '(load "emacs-address-cleaning.el") > (notmuch-test-address-cleaning-'$i')' > +done > + > +test_done > diff --git a/test/notmuch-test b/test/notmuch-test > ind

Re: [PATCH v5 1/2] mime node: Record depth-first part numbers

2012-01-24 Thread Dmitry Kurochkin
On Mon, 23 Jan 2012 18:33:09 -0500, Austin Clements wrote: > This makes the part numbers readily accessible to formatters. > Hierarchical part numbering would be a more natural and efficient fit > for MIME and may be the way to go in the future, but depth-first > numbering maintains compatibility

Re: [PATCH v5 2/2] show: Introduce mime_node formatter callback

2012-01-24 Thread Dmitry Kurochkin
On Mon, 23 Jan 2012 18:33:10 -0500, Austin Clements wrote: > This callback is the gateway to the new mime_node_t-based formatters. > This maintains backwards compatibility so the formatters can be > transitioned one at a time. Once all formatters are converted, the > formatter structure can be re

[PATCH v3 0/3] emacs: notmuch-hello search cleanup

2012-01-24 Thread Dmitry Kurochkin
Changes: v3: * rebased on current master v2: * expected results changes for tests moved from patch 2 to 1 where it belong Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v3 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello buffer

2012-01-24 Thread Dmitry Kurochkin
Before the change, "s" in notmuch-hello buffer would jump to the search box. The patch changes the binding to `notmuch-search' which is consistent with all other notmuch buffers. --- emacs/notmuch-hello.el | 19 ++- test/emacs.expected-output/notmuch-

[PATCH v3 2/3] emacs: use a single history for all searches

2012-01-24 Thread Dmitry Kurochkin
There are two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Before the change, these search mechanisms used different history lists. The patch makes notmuch-hello search use the same history list as `notmuch-search' function. ---

[PATCH v3 3/3] emacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer

2012-01-24 Thread Dmitry Kurochkin
`notmuch-hello-search' uses `notmuch-search' function but refreshes notmuch-hello buffer when the search buffer is closed. --- emacs/notmuch-hello.el |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 004287a..64011d4

Re: [RFC PATCH 4/5] show: Convert text format to the new self-recursive style

2012-01-24 Thread Dmitry Kurochkin
On Wed, 11 Jan 2012 20:49:32 -0500, Austin Clements wrote: > This is all code movement and a smidgen of glue. This moves the > existing text formatter code into one self-recursive function, but > doesn't change any of the logic. The next patch will actually take > advantage of what the new struc

Re: [RFC PATCH 5/5] show: Simplify new text formatter code

2012-01-24 Thread Dmitry Kurochkin
On Wed, 11 Jan 2012 20:49:33 -0500, Austin Clements wrote: > This makes the text formatter take advantage of the new code > structure. The previously duplicated header logic is now unified, > several things that we used to compute repeatedly across different > callbacks are now computed once, and

Re: [PATCH v2 1/3] mime node: Record depth-first part numbers

2012-01-24 Thread Dmitry Kurochkin
On Sun, 22 Jan 2012 21:31:11 -0500, Austin Clements wrote: > This makes the part numbers readily accessible to formatters. > Hierarchical part numbering would be a more natural and efficient fit > for MIME and may be the way to go in the future, but depth-first > numbering maintains compatibility

Re: [PATCH v2 3/3] show: Introduce mime_node formatter callback

2012-01-24 Thread Dmitry Kurochkin
On Sun, 22 Jan 2012 21:31:13 -0500, Austin Clements wrote: > This callback is the gateway to the new mime_node_t-based formatters. > This maintains backwards compatibility so the formatters can be > transitioned one at a time. Once all formatters are converted, the > formatter structure can be re

Re: [PATCH v7 2/2] emacs: Tests for user-defined sections

2012-01-24 Thread Dmitry Kurochkin
Hi Daniel. There are some trailing whitespaces in the tests. Also, please consider moving the hello sections tests to a separate file (emacs-hello-sections, perhaps?). I am worried that test/emacs file becomes too big. And we will probably add more notmuch-hello section-related tests in the fut

Re: [PATCH 1/4 v42] test: Don't return the result of checking for running emacs to the tester.

2012-01-24 Thread Dmitry Kurochkin
On Mon, 23 Jan 2012 18:05:44 +, David Edmondson wrote: > When checking for a running emacs, test_emacs evaluates the empty list > '()'. This returns 'nil' when emacs is running, which is then > prepended to the actual test result. Given that it is not part of the > actual test output the test

Re: [PATCH 2/4 v42] test: Add `test_emacs_expect_t'.

2012-01-24 Thread Dmitry Kurochkin
On Mon, 23 Jan 2012 18:05:45 +, David Edmondson wrote: > Add a new test function to allow simpler testing of emacs > functionality. > > `test_emacs_expect_t' takes one argument - a lisp expression to > evaluate. The test passes if the expression returns `t', otherwise it > fails and the outpu

Re: [PATCH 4/4 v42] test: Add address cleaning tests.

2012-01-24 Thread Dmitry Kurochkin
On Mon, 23 Jan 2012 18:05:47 +, David Edmondson wrote: > --- > > Anticipate the failure of test 3. > LGTM Regards, Dmitry > test/emacs-address-cleaning.el | 29 + > test/emacs-address-cleaning.sh | 19 +++ > test/notmuch-test

Re: [PATCH 3/4 v42] test: Add more helpers for emacs tests.

2012-01-24 Thread Dmitry Kurochkin
> index 96752f0..c4a5db4 100644 > --- a/test/test-lib.el > +++ b/test/test-lib.el > @@ -20,6 +20,8 @@ > ;; > ;; Authors: Dmitry Kurochkin > > +(require 'cl);; This code is generally used uncompiled. > + > ;; `read-file-name' by default uses `

Re: [PATCH 0/4 v43] emacs test helpers

2012-01-24 Thread Dmitry Kurochkin
On Tue, 24 Jan 2012 16:14:03 +, David Edmondson wrote: > Small changes as per Dmitry's last comments. > LGTM Regards, Dmitry > David Edmondson (4): > test: Don't return the result of checking for running emacs to the > tester. > test: Add `test_emacs_expect_t'. > test: Add more

[PATCH v4 0/3] emacs: notmuch-hello search cleanup

2012-01-24 Thread Dmitry Kurochkin
Changes: v4: * do not add queries from saved search and tag buttons to the history v3: * rebased on current master v2: * expected results changes for tests moved from patch 2 to 1 where it belong Regards, Dmitry ___ notmuch mailing list notmuch@n

[PATCH v4 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello buffer

2012-01-24 Thread Dmitry Kurochkin
Before the change, "s" in notmuch-hello buffer would jump to the search box. The patch changes the binding to `notmuch-search' which is consistent with all other notmuch buffers. --- emacs/notmuch-hello.el | 19 ++- test/emacs.expected-output/notmuch-

[PATCH v4 3/3] emacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer

2012-01-24 Thread Dmitry Kurochkin
`notmuch-hello-search' uses `notmuch-search' function but refreshes notmuch-hello buffer when the search buffer is closed. --- emacs/notmuch-hello.el |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 6970bc3..ab65e36

[PATCH v4 2/3] emacs: use a single history for all searches

2012-01-24 Thread Dmitry Kurochkin
There are two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Before the change, these search mechanisms used different history lists. The patch makes notmuch-hello search use the same history list as `notmuch-search' function. ---

Re: [PATCH 1/1] emacs: Take more care when hiding regions with buttons.

2012-01-25 Thread Dmitry Kurochkin
On Wed, 25 Jan 2012 15:05:08 +, David Edmondson wrote: > If the region to be hidden with a button by > `notmuch-wash-region-to-button' starts at the beginning of the buffer, > the invisible region will include the inserted button. This is > unfortunate, as it means that it is not possible to s

Re: [PATCH 1/4 v2] test: `visible-buffer-substring' should not return text properties.

2012-01-25 Thread Dmitry Kurochkin
On Wed, 25 Jan 2012 15:45:25 +, David Edmondson wrote: > When using `visible-buffer-substring' to examine a buffer, the text > properties are not useful, so don't include them. > --- > test/test-lib.el |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/test/test-l

Re: [PATCH 2/4 v2] test: `notmuch-test-run' should protect against buffer switching.

2012-01-25 Thread Dmitry Kurochkin
On Wed, 25 Jan 2012 15:45:26 +, David Edmondson wrote: > The body of the test may cause the current buffer to change. Ensure > that the output goes to the correct buffer by switching back before > inserting it. LGTM Regards, Dmitry > --- > test/test-lib.el |4 +++- > 1 files changed,

Re: [PATCH 3/4 v2] test: Add test for Original Message hiding at point-min.

2012-01-25 Thread Dmitry Kurochkin
On Wed, 25 Jan 2012 15:45:27 +, David Edmondson wrote: > --- > test/emacs-original-message-hiding.el | 15 +++ > test/emacs-original-message-hiding.sh | 20 > test/notmuch-test |1 + > 3 files changed, 36 insertions(+), 0 deletions(

Re: [PATCH 4/4 v2] emacs: Take more care when hiding regions with buttons.

2012-01-25 Thread Dmitry Kurochkin
On Wed, 25 Jan 2012 15:45:28 +, David Edmondson wrote: > If the region to be hidden with a button by > `notmuch-wash-region-to-button' starts at the beginning of the buffer, > the invisible region will include the inserted button. This is > unfortunate, as it means that it is not possible to s

[PATCH] emacs: polish notmuch-hello help text

2012-01-25 Thread Dmitry Kurochkin
Make `=' binding description consistent with others. --- emacs/notmuch-hello.el |2 +- test/emacs.expected-output/notmuch-hello |2 +- .../notmuch-hello-no-saved-searches|2 +- .../emacs.expected-output/notmuch-hello-with-empty |

[PATCH] emacs: add completion to "tag all" operation ("*" binding)

2012-01-25 Thread Dmitry Kurochkin
The patch adds completion to "tag all" operation bound to "*" (`notmuch-search-operate-all' function). --- emacs/notmuch.el | 48 1 files changed, 36 insertions(+), 12 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index e02966f..

[PATCH v2] emacs: add completion to "tag all" operation ("*" binding)

2012-01-25 Thread Dmitry Kurochkin
The patch adds completion to "tag all" operation bound to "*" (`notmuch-search-operate-all' function). --- Changes in v2: * s/thistag/this_tag/ for consistency with "that_tag", since we touch the line anyway Regards, Dmitry emacs/notmuch.el | 48 -

Re: [PATCH] emacs: add completion to "tag all" operation ("*" binding)

2012-01-25 Thread Dmitry Kurochkin
about making "+" and "-" accepting multiple tags using `notmuch-select-tags-with-completion'. But that is for another patch. > Quoth Dmitry Kurochkin on Jan 26 at 5:12 am: > > The patch adds completion to "tag all" operation bound to "*" > >

[PATCH v3] emacs: add completion to "tag all" operation ("*" binding)

2012-01-25 Thread Dmitry Kurochkin
The patch adds completion to "tag all" operation bound to "*" (`notmuch-search-operate-all' function). --- Changes: v3: * fixed comments from Austin's review [1] v2: * s/thistag/this_tag/ for consistency with "that_tag", since we touch the line anyway Regards, Dmitry [1] id:"20120126013

[PATCH v4] emacs: add completion to "tag all" operation ("*" binding)

2012-01-25 Thread Dmitry Kurochkin
The patch adds completion to "tag all" operation bound to "*" (`notmuch-search-operate-all' function). --- On a second thought, `notmuch-select-tag-with-completion' should never need `prefixes' argument at all. So I reverted the API and related changes. Changes: v4: * do not change `notmuch-s

Re: [PATCH 0/2] re-enable line wrapping and add some header bling

2012-01-26 Thread Dmitry Kurochkin
Hi David. On Thu, 26 Jan 2012 08:17:49 +, David Edmondson wrote: > By default, re-enable `visual-line-mode' in `notmuch-show-mode'. Do it > via a hook so that purists (ahem) can turn it off. > > Add some more processing of headers to make them look nice. Do it via > hooks so that unbelievers

[PATCH v5 0/2] emacs: add completion to "tag all" operation

2012-01-26 Thread Dmitry Kurochkin
Changes: v5: * fixed comments from Austin's review [2] * add a second patch with `notmuch-search-operate-all' code cleanup suggested by Austin [1] v4: * do not change `notmuch-select-tag-with-completion' API, revert related changes v3: * fixed comments from Austin's review [1] v2: * s/

[PATCH v5 2/2] emacs: `notmuch-search-operate-all' code cleanup, no functional changes

2012-01-26 Thread Dmitry Kurochkin
--- emacs/notmuch.el | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 291eca2..72f78ed 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -891,12 +891,11 @@ characters as well as `_.+-'. "Operations (+

[PATCH v5 1/2] emacs: add completion to "tag all" operation ("*" binding)

2012-01-26 Thread Dmitry Kurochkin
The patch adds completion to "tag all" operation bound to "*" (`notmuch-search-operate-all' function). --- emacs/notmuch.el | 60 +++-- 1 files changed, 44 insertions(+), 16 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index e029

Re: [PATCH v4] emacs: add completion to "tag all" operation ("*" binding)

2012-01-26 Thread Dmitry Kurochkin
On Thu, 26 Jan 2012 02:04:39 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jan 26 at 9:06 am: > > The patch adds completion to "tag all" operation bound to "*" > > (`notmuch-search-operate-all' function). > > --- > > > >

Re: [PATCH] emacs: add completion to "tag all" operation ("*" binding)

2012-01-26 Thread Dmitry Kurochkin
On Thu, 26 Jan 2012 08:46:00 +, David Edmondson wrote: > On Thu, 26 Jan 2012 05:47:07 +0400, Dmitry Kurochkin > wrote: > > > > + ;; Perform some validation > > > > + (let ((words action)) > > > > +(when (null words) (error "

Re: [RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-27 Thread Dmitry Kurochkin
On Fri, 27 Jan 2012 09:42:23 +0100, Pieter Praet wrote: > On Thu, 26 Jan 2012 14:40:26 +, David Edmondson wrote: > > In general, I like this. > > > > - I think that the stash function(s) should take an optional argument > > specifying the archive to use. That will make testing simpler and

[PATCH 1/6] emacs: move tag format validation to `notmuch-tag' function

2012-01-27 Thread Dmitry Kurochkin
Before the change, tag format validation was done in `notmuch-search-operate-all' function only. The patch moves it down to `notmuch-tag', so that all users of that function get input validation. --- emacs/notmuch.el | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --gi

[PATCH 2/6] emacs: remove text properties from `notmuch-search-get-tags' result

2012-01-27 Thread Dmitry Kurochkin
--- emacs/notmuch.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 84d7d0a..ff46617 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -577,7 +577,7 @@ the messages that were tagged" (let ((beg (+ (point) 1))) (

[PATCH 3/6] emacs: make "+" and "-" tagging operations more robust

2012-01-27 Thread Dmitry Kurochkin
Before the change, "+" and "-" tagging operations in notmuch-search and notmuch-show views accepted only a single tag. The patch makes them use the recently added `notmuch-select-tags-with-completion' function, which allows to enter multiple tags with "+" and "-" prefixes. So after the change, "+

[PATCH 4/6] test: fix emacs tests after tagging operations changes

2012-01-27 Thread Dmitry Kurochkin
After the recent tagging operations changes, functions bound to "+" and "-" in notmuch-search and notmuch-show views always read input from the minibuffer. Use kbd macros instead of calling them directly. --- test/emacs | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(

[PATCH 5/6] emacs: add "*" binding for notmuch-show view

2012-01-27 Thread Dmitry Kurochkin
The patch adds `notmuch-show-operate-all' function bound to "*" in notmuch-show view. The function is similar to the `notmuch-search-operate-all' function for the notmuch-search view: it changes tags for all messages in the current thread. --- emacs/notmuch-show.el | 16 1 file

[PATCH 6/6] emacs: separate history for operations which accept single and multiple tags

2012-01-27 Thread Dmitry Kurochkin
Some tag-related operations accept a single tag without prefix (`notmuch-select-tag-with-completion'), others accept multiple tags prefixed with '+' or '-' (`notmuch-select-tags-with-completion'). Before the change, both functions used a single default minibuffer history. This is inconvenient beca

[PATCH] test: remove ".sh" extension from the recently added Emacs tests

2012-01-27 Thread Dmitry Kurochkin
All test files, except for the recently added Emacs tests, do not have ".sh" extension. So remove it from the new test files for consistency. --- test/emacs-address-cleaning| 18 ++ test/emacs-address-cleaning.sh | 18 -- test/emacs-test-functions |

[PATCH 7/6] emacs: relax tag syntax check in `notmuch-tag' function

2012-01-27 Thread Dmitry Kurochkin
The tag syntax check in `notmuch-tag' function was too strict and did not allow nmbug tags with "::". Since the check is done for all tagging operations in Emacs UI, this basically means that no nmbug tags can be changed. The patch relaxes the tag syntax check to allow any tag names that do not i

[PATCH 8/6] emacs: use message ids instead of thread id in `notmuch-show-operate-all'

2012-01-27 Thread Dmitry Kurochkin
Before the change, `notmuch-show-operate-all' used thread id for "notmuch tag" search. This could result in tagging unexpected messages that were added to the thread after the notmuch-show buffer was created. The patch changes `notmuch-show-operate-all' to use ids of shown messages to fix this. -

[PATCH 9/6] emacs: code cleanup in `notmuch-show-operate-all', no functional changes

2012-01-27 Thread Dmitry Kurochkin
Use `notmuch-show-mapc' function instead of a custom `loop'. --- emacs/notmuch-show.el | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index e606224..4ec3fce 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-sh

[PATCH] tag: remove unused attribute from notmuch_tag_command() arguments

2012-01-28 Thread Dmitry Kurochkin
Argc and argv arguments are used in notmuch_tag_command() function. So unused attribute is not appropriate for them. --- notmuch-tag.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-tag.c b/notmuch-tag.c index 44fd61f..36b9b09 100644 --- a/notmuch-tag.c +++ b/not

Re: [PATCH 8/6] emacs: use message ids instead of thread id in `notmuch-show-operate-all'

2012-01-28 Thread Dmitry Kurochkin
problem is out of scope of this patch series. Currently, neither notmuch-search region tagging code nor the proposed patch try to solve the issue. If and when a proper solution is found, we should implement it for both (or probably more) cases (provided this patch gets accepted). Regards,

Re: [PATCH 7/6] emacs: relax tag syntax check in `notmuch-tag' function

2012-01-28 Thread Dmitry Kurochkin
On Sat, 28 Jan 2012 10:56:21 +0200, Jani Nikula wrote: > On Jan 28, 2012 7:06 AM, "Dmitry Kurochkin" > wrote: > > > > The tag syntax check in `notmuch-tag' function was too strict and did > > not allow nmbug tags with "::". Since the check i

Re: [PATCH 3/6] emacs: make "+" and "-" tagging operations more robust

2012-01-28 Thread Dmitry Kurochkin
" characters. This series does not aim to resolve them and not make it worse. Also see Jani's reply to another patch in the series. Regards, Dmitry [1] id:"cab+hun834oj+xgx-yyysgxsnzrbycmvcu4vd73ws28qts2r...@mail.gmail.com" > On Fri, Jan 27, 2012 at 21:41, Dmitry Kurochki

Re: [PATCH v7 2/2] emacs: Tests for user-defined sections

2012-01-28 Thread Dmitry Kurochkin
Hi Daniel. On Sat, 28 Jan 2012 22:30:57 +0100, Daniel Schoepe wrote: > Hi Dmitry, > > On Tue, 24 Jan 2012 03:07, Dmitry Kurochkin > wrote: > > There are some trailing whitespaces in the tests. > > those are also produced by the various notmuch-hello functions, and ar

[PATCH 1/2] test: auto load elisp tests file in test_emacs if available

2012-01-28 Thread Dmitry Kurochkin
This allows us to simplify shell part of tests written in elisp. --- 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 8158328..0174e93 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -943,6 +943,12 @@

[PATCH 2/2] test: remove explicit loading of elisp tests in emacs-address-cleaning

2012-01-28 Thread Dmitry Kurochkin
It is no longer needed, since elisp tests files are auto loaded now. --- test/emacs-address-cleaning |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/emacs-address-cleaning b/test/emacs-address-cleaning index 51018fe..6ddde5c 100755 --- a/test/emacs-address-cle

Re: [PATCH 1/6] emacs: move tag format validation to `notmuch-tag' function

2012-01-29 Thread Dmitry Kurochkin
Hi Austin. On Sun, 29 Jan 2012 16:34:27 -0500, Austin Clements wrote: > One philosophical nit below, but not enough to hold this up. > > Quoth Dmitry Kurochkin on Jan 28 at 8:41 am: > > Before the change, tag format validation was done in > > `notmuch-search-operate-all

Re: [PATCH 4/6] test: fix emacs tests after tagging operations changes

2012-01-29 Thread Dmitry Kurochkin
On Sun, 29 Jan 2012 17:58:41 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jan 28 at 8:41 am: > > After the recent tagging operations changes, functions bound to "+" > > and "-" in notmuch-search and notmuch-show views always read input >

Re: [PATCH 1/6] emacs: move tag format validation to `notmuch-tag' function

2012-01-29 Thread Dmitry Kurochkin
On Sun, 29 Jan 2012 18:16:50 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jan 30 at 2:54 am: > > Hi Austin. > > > > On Sun, 29 Jan 2012 16:34:27 -0500, Austin Clements > > wrote: > > > One philosophical nit below, but not enough to hol

Re: [PATCH 3/6] emacs: make "+" and "-" tagging operations more robust

2012-01-29 Thread Dmitry Kurochkin
Hi Austin. The below changes will be send as v2 soon. On Sun, 29 Jan 2012 17:57:10 -0500, Austin Clements wrote: > I'm looking forward to having this. I think it'll streamline tagging > operations. > > Quoth Dmitry Kurochkin on Jan 28 at 8:41 am: > > Before the

Re: [PATCH 6/6] emacs: separate history for operations which accept single and multiple tags

2012-01-29 Thread Dmitry Kurochkin
On Sun, 29 Jan 2012 18:02:29 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jan 28 at 8:41 am: > > Some tag-related operations accept a single tag without prefix > > (`notmuch-select-tag-with-completion'), others accept multiple tags > > prefixed with '

Re: [PATCH 8/6] emacs: use message ids instead of thread id in `notmuch-show-operate-all'

2012-01-29 Thread Dmitry Kurochkin
EOn Sun, 29 Jan 2012 18:11:20 -0500, Austin Clements wrote: > Eighth in the increasingly inaccurately named six patch series... > > Quoth Dmitry Kurochkin on Jan 28 at 9:59 am: > > Before the change, `notmuch-show-operate-all' used thread id for > > "notmuch tag

  1   2   3   4   5   6   7   8   9   10   >