[PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > > The only way I know to > > > reliably kill a child process is to open a pipe to it and have it exit > > > on its own when it reads EOF. Unfortunately, I couldn't find a way to > > > do this with an emacs daemon (it appears daemon mode aggressive

Re: Race condition for '*' command

2011-06-27 Thread Pieter Praet
On Sun, 26 Jun 2011 10:00:41 +0100, Robin Green wrote: > On Sat, 25 Jun 2011 16:57:50 -0700, Jameson Graef Rollins > wrote: > > On Sat, 25 Jun 2011 23:18:52 +0100, Robin Green wrote: > > > A race condition in the '*' command was noted when it was first > > > proposed. It looks to me like it sti

Re: [PATCH] test:Folder tags shouldn't match after removal of file in given folder

2011-06-27 Thread Pieter Praet
On Mon, 27 Jun 2011 11:12:24 -0600, Mark Anderson wrote: > > Test for bug. Current stemming support for notmuch adds extra terms > to the DB which aren't removed when the file renames are detected. > > When folder tags are added to a message, Xapian terms for both XFOLDER > and ZXFOLDER are gen

Re: Debian package not building

2011-06-27 Thread Pieter Praet
On Fri, 24 Jun 2011 16:34:02 -0700, Jameson Graef Rollins wrote: Non-text part: multipart/mixed Non-text part: multipart/signed > Hey, folks. As of today I am for some reason no longer able to build > the Notmuch Debian package. I'm using the same build technique I have > been using for a while

Re: [PATCH] test:Improve test behaviors when --root is used

2011-06-27 Thread Pieter Praet
On Mon, 27 Jun 2011 16:50:47 -0400, Austin Clements wrote: > This looks great (modulo one bug, below). I've wanted to run the > tests on tmpfs before, but was too lazy to actually fix the tests. > > Given how easy it is to accidentally use "..", I wonder if there's a > way to force people to use

Re: Drafts being tagged as inbox

2011-06-27 Thread Pieter Praet
On Mon, 27 Jun 2011 22:50:25 +0100, Robin Green wrote: > My drafts (created using emacs message mode) are being tagged as > inbox. However, they are not tagged as drafts. This is because emacs > message mode does not store drafts in Maildir format, so there are no > Maildir flags (e.g. D for draft

Drafts being tagged as inbox

2011-06-27 Thread Robin Green
My drafts (created using emacs message mode) are being tagged as inbox. However, they are not tagged as drafts. This is because emacs message mode does not store drafts in Maildir format, so there are no Maildir flags (e.g. D for draft) to sync tags with. Now, I could simply store drafts somewhere

interaction between --format=raw and multipart handling [was: Re: Do not attept to output part raw if part is not GMimePart.]

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 6:41 PM, Daniel Kahn Gillmor wrote: > On 06/27/2011 06:07 PM, Austin Clements wrote: >> Oh, right, of course. ?show_message_part will walk into the parts, so >> format_part_content_raw will still be called on the leafs of a >> requested multipart. ?Though, this approach res

[PATCH] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Before the change, every Emacs test ran in a separate Emacs instance. Starting Emacs many times wastes considerable time and it gets worse as the test suite grows. The patch solves this by using a single Emacs server and emacsclient(1) to run multiple tests. Emacs server is started on the first

[PATCH 04/10] test: wrap and indent test_emacs calls

2011-06-27 Thread Dmitry Kurochkin
Most test_emacs calls have long arguments that consist of many expressions. Putting them on a single line makes it hard to read and produces poor diff when they are changed. The patch puts every expression in test_emacs calls on a separate line. --- test/emacs | 124 ++

[PATCH 10/10] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Before the change, every Emacs test ran in a separate Emacs instance. Starting Emacs many times wastes considerable time and it gets worse as the test suite grows. The patch solves this by using a single Emacs server and emacsclient(1) to run multiple tests. Emacs server is started on the first

[PATCH 08/10] test: set variables using `let' instead of `setq' in Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Using `setq' for setting variables in Emacs tests affect other tests that may run in the same Emacs environment. Currently it works because each test is run in a separate Emacs instance. But in the future multiple tests will run in a single Emacs instance. The patch changes all variables to use `

[PATCH 09/10] test: generate run_emacs script once on test startup

2011-06-27 Thread Dmitry Kurochkin
Instead of generating auxiliary run_emacs script every time test_emacs is run, do it once in the beginning of the test. Also, use absolute paths in the script to make it more robust. --- test/test-lib.sh | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tes

[PATCH 07/10] test: use emacs_deliver_message in Emacs SMTP send test

2011-06-27 Thread Dmitry Kurochkin
Minor changes to expected results of other Emacs tests were needed because the message Date header changed. --- test/emacs | 34 +- 1 files changed, 9 insertions(+), 25 deletions(-) diff --git a/test/emacs b/test/emacs index 4592005..409e033 100755 --- a/test/ema

[PATCH 05/10] test: save buffer content to file instead of printing it in Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Before the change, the common Emacs test scheme was to print buffer content to stdout and redirect it to a file or capture it in a shell variable. This does not work if we switch to using emacsclient(1) for running the tests, because you can not print to the stdout in this case. (Actually, you can

[PATCH 06/10] test: remove some sed(1) calls in Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Few Emacs tests used sed(1) to remove unexpected output in the beginning to avoid getting confused by messages such as "Parsing /home/cworth/.mailrc... done". This is no longer needed since tests are run in a temporary home directory instead of the user's one. So remove these sed(1) calls. --- t

[PATCH 03/10] test: cleanup test_emacs

2011-06-27 Thread Dmitry Kurochkin
Move auxiliary function definition and configuration from command line to test-lib.el. --- test/test-lib.el |8 test/test-lib.sh |9 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/test/test-lib.el b/test/test-lib.el index 9439996..344a02e 100644 --- a/tes

[PATCH 02/10] test: do not set `message-signature' in test_emacs

2011-06-27 Thread Dmitry Kurochkin
It is no longer needed since tests are run in a temporary home directory instead of the user's one. --- test/test-lib.sh |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index cc20f41..3ec388c 100755 --- a/test/test-lib.sh +++ b/test/te

[PATCH 01/10] test: fix argument order of test_expect_equal_file in few tests

2011-06-27 Thread Dmitry Kurochkin
Few Emacs tests had test_expect_equal_file arguments in the wrong order: the first argument should be the test output and the second one should be the expected. --- test/emacs |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/emacs b/test/emacs index 6f82b08..f4ff3f1

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 00:17:42 -0400, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jun 28 at 7:59 am: > > I am sure that would work, but I do not like the complexity. How about > > getting back to standard emacsclient and running a watchdog in the > > emacs? Like: > > > > (defun orphan-wat

Notmuch scripts

2011-06-27 Thread Ben Gamari
On Fri, 24 Jun 2011 11:29:21 -0700, Carl Worth wrote: > > * Spam filter. Do you guys use any? What does it's interface look like? > > I currently use bsfilter which I've found does it's job pretty > > well. > > I've currently got amavis and spamassassin adding extra headers, (and > belo

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 28 at 7:59 am: > I am sure that would work, but I do not like the complexity. How about > getting back to standard emacsclient and running a watchdog in the > emacs? Like: > > (defun orphan-watchdog (pid) > "Periodically check that the process with id PID is stil

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
On Mon, 27 Jun 2011 23:49:37 -0400, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > > > The only way I know to > > > > reliably kill a child process is to open a pipe to it and have it exit > > > > on its own when it reads EOF. Unfortunately, I couldn't find a way to >

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > > The only way I know to > > > reliably kill a child process is to open a pipe to it and have it exit > > > on its own when it reads EOF. Unfortunately, I couldn't find a way to > > > do this with an emacs daemon (it appears daemon mode aggressive

Re: interaction between --format=raw and multipart handling [was: Re: Do not attept to output part raw if part is not GMimePart.]

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 6:41 PM, Daniel Kahn Gillmor wrote: > On 06/27/2011 06:07 PM, Austin Clements wrote: >> Oh, right, of course.  show_message_part will walk into the parts, so >> format_part_content_raw will still be called on the leafs of a >> requested multipart.  Though, this approach res

interaction between --format=raw and multipart handling [was: Re: Do not attept to output part raw if part is not GMimePart.]

2011-06-27 Thread Daniel Kahn Gillmor
nce handy that says it's the case. At any rate, i'm not sure it affects the need for being able to emit both "rare" and "source" forms of at least the leaf (non-multipart) parts. i hope this is all at least somewhat clarifying and not just adding to the confusion, --dkg -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1030 bytes Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110627/e2242ea7/attachment.pgp>

Re: Notmuch scripts

2011-06-27 Thread Ben Gamari
On Fri, 24 Jun 2011 11:29:21 -0700, Carl Worth wrote: > > * Spam filter. Do you guys use any? What does it's interface look like? > > I currently use bsfilter which I've found does it's job pretty > > well. > > I've currently got amavis and spamassassin adding extra headers, (and > belo

[PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Austin Clements
Quoth Jameson Graef Rollins on Jun 27 at 2:44 pm: > On Mon, 27 Jun 2011 16:43:36 -0400, Austin Clements > wrote: > > Just to clarify my understanding, --format=raw is only intended to > > work on either the whole message (special-cased in do_show_single) or > > a leaf MIME part, and in any other

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Austin, On Tue, 28 Jun 2011 00:22:41 +0400, Dmitry Kurochkin wrote: > On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements wrote: > > This looks like a great idea! The test suite has been getting irritating > > slow. > > > > A few minor comments: This patch would be clearer if it the > > setq

[PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Daniel Kahn Gillmor
s Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110627/88d7b382/attachment.pgp>

[PATCH] test:Improve test behaviors when --root is used

2011-06-27 Thread Mark Anderson
On Mon, 27 Jun 2011 15:50:47 -0500, Austin Clements wrote: > This looks great (modulo one bug, below). I've wanted to run the > tests on tmpfs before, but was too lazy to actually fix the tests. > > Given how easy it is to accidentally use "..", I wonder if there's a > way to force people to use

[PATCH] test:Folder tags shouldn't match after removal of file in given folder

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 1:12 PM, Mark Anderson wrote: > +test_begin_subtest "Test matches folder:spam" > +output=$(notmuch search folder:spam) > +test_expect_equal "$output" "thread:0001 ? 2001-01-05 [1/1] > Notmuch Test Suite; Test message #1 (inbox unread)" > + > +sleep 1; I assume

[PATCH] test:Folder tags shouldn't match after removal of file in given folder

2011-06-27 Thread Mark Anderson
On Mon, 27 Jun 2011 15:58:00 -0500, Austin Clements wrote: > On Mon, Jun 27, 2011 at 1:12 PM, Mark Anderson wrote: > > +test_begin_subtest "Test matches folder:spam" > > +output=$(notmuch search folder:spam) > > +test_expect_equal "$output" "thread:0001 ? 2001-01-05 [1/1] > > Notmuch

[PATCH] test:Improve test behaviors when --root is used

2011-06-27 Thread Austin Clements
This looks great (modulo one bug, below). I've wanted to run the tests on tmpfs before, but was too lazy to actually fix the tests. Given how easy it is to accidentally use "..", I wonder if there's a way to force people to use $TEST_DIRECTORY? On Mon, Jun 27, 2011 at 12:09 PM, Mark Anderson wr

[PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 1:07 PM, Jameson Graef Rollins wrote: > On Thu, 23 Jun 2011 16:33:18 -0700, Carl Worth wrote: >> I'd like to investigate this case a little bit to help answer the >> question of whether "notmuch should have done anything in this case". > > Hi, Carl. ?You can see this error

[PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 4:22 PM, Dmitry Kurochkin wrote: > On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements > wrote: >> ?The trap is there just to cleanly shut down in case of a normal >> exit [1]. > > For normal exit we should just put this into test_done. ?Otherwise it is > not a normal exi

Re: [PATCH] test:Improve test behaviors when --root is used

2011-06-27 Thread Mark Anderson
On Mon, 27 Jun 2011 15:50:47 -0500, Austin Clements wrote: > This looks great (modulo one bug, below). I've wanted to run the > tests on tmpfs before, but was too lazy to actually fix the tests. > > Given how easy it is to accidentally use "..", I wonder if there's a > way to force people to use

[PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Austin Clements
This looks like a great idea! The test suite has been getting irritating slow. A few minor comments: This patch would be clearer if it the setq-to-let translation were a separate patch. It would also be worth adding a big comment at the top of the test explaining why all of the tests let-bind ev

Re: [PATCH] test:Folder tags shouldn't match after removal of file in given folder

2011-06-27 Thread Mark Anderson
On Mon, 27 Jun 2011 15:58:00 -0500, Austin Clements wrote: > On Mon, Jun 27, 2011 at 1:12 PM, Mark Anderson wrote: > > +test_begin_subtest "Test matches folder:spam" > > +output=$(notmuch search folder:spam) > > +test_expect_equal "$output" "thread:0001   2001-01-05 [1/1] > > Notmuch

interaction between --format=raw and multipart handling [was: Re: Do not attept to output part raw if part is not GMimePart.]

2011-06-27 Thread Daniel Kahn Gillmor
On 06/27/2011 06:07 PM, Austin Clements wrote: > Oh, right, of course. show_message_part will walk into the parts, so > format_part_content_raw will still be called on the leafs of a > requested multipart. Though, this approach results in each leaf being > transfer decoded and printed individuall

Re: [PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Austin Clements
Quoth Jameson Graef Rollins on Jun 27 at 2:44 pm: > On Mon, 27 Jun 2011 16:43:36 -0400, Austin Clements wrote: > > Just to clarify my understanding, --format=raw is only intended to > > work on either the whole message (special-cased in do_show_single) or > > a leaf MIME part, and in any other ca

Drafts being tagged as inbox

2011-06-27 Thread Robin Green
My drafts (created using emacs message mode) are being tagged as inbox. However, they are not tagged as drafts. This is because emacs message mode does not store drafts in Maildir format, so there are no Maildir flags (e.g. D for draft) to sync tags with. Now, I could simply store drafts somewhere

Re: [PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Jameson Graef Rollins
On Mon, 27 Jun 2011 16:43:36 -0400, Austin Clements wrote: > Just to clarify my understanding, --format=raw is only intended to > work on either the whole message (special-cased in do_show_single) or > a leaf MIME part, and in any other case, it will output nothing? The > raw output test cases se

[PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Jameson Graef Rollins
bbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110627/0bef3f1e/attachment-0001.pgp>

Re: [PATCH] fix sum moar typos

2011-06-27 Thread Carl Worth
On Fri, 24 Jun 2011 22:04:13 +0200, Pieter Praet wrote: > You however, seem to be incredibly disciplined in this respect, > so statistically speaking, you're destined to become typo-king, > and you have every reason to be *proud* of it. :D Thanks for the compliment (even if sideways)! I enjoyed t

[PATCH] fix sum moar typos

2011-06-27 Thread Carl Worth
- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110627/e24e6641/attachment.pgp>

Re: [RFC][PATCH] tags_to_maildir_flags: Add option to not move messages from "new/" to "cur/"

2011-06-27 Thread Carl Worth
On Fri, 24 Jun 2011 22:34:03 +0200, Louis Rilling wrote: > Maybe the alternate solution could consist in simply not renaming emails > having > no flags to be changed (Currently notmuch_message_tags_to_maildir_flags() > unconditionally moves messages from new/ to cur/). This would even lead to a >

[RFC][PATCH] tags_to_maildir_flags: Add option to not move messages from "new/" to "cur/"

2011-06-27 Thread Carl Worth
much work for you. -Carl -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110627/76c92c7b/attachment.pgp>

Re: [PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Daniel Kahn Gillmor
On 06/27/2011 04:43 PM, Austin Clements wrote: > Just to clarify my understanding, --format=raw is only intended to > work on either the whole message (special-cased in do_show_single) or > a leaf MIME part, and in any other case, it will output nothing? The > raw output test cases seem pretty thi

Re: [PATCH] test:Folder tags shouldn't match after removal of file in given folder

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 1:12 PM, Mark Anderson wrote: > +test_begin_subtest "Test matches folder:spam" > +output=$(notmuch search folder:spam) > +test_expect_equal "$output" "thread:0001   2001-01-05 [1/1] > Notmuch Test Suite; Test message #1 (inbox unread)" > + > +sleep 1; I assume

Re: [PATCH] test:Improve test behaviors when --root is used

2011-06-27 Thread Austin Clements
This looks great (modulo one bug, below). I've wanted to run the tests on tmpfs before, but was too lazy to actually fix the tests. Given how easy it is to accidentally use "..", I wonder if there's a way to force people to use $TEST_DIRECTORY? On Mon, Jun 27, 2011 at 12:09 PM, Mark Anderson wr

Re: [PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 1:07 PM, Jameson Graef Rollins wrote: > On Thu, 23 Jun 2011 16:33:18 -0700, Carl Worth wrote: >> I'd like to investigate this case a little bit to help answer the >> question of whether "notmuch should have done anything in this case". > > Hi, Carl.  You can see this error

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 4:22 PM, Dmitry Kurochkin wrote: > On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements wrote: >>  The trap is there just to cleanly shut down in case of a normal >> exit [1]. > > For normal exit we should just put this into test_done.  Otherwise it is > not a normal exit a

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements wrote: > This looks like a great idea! The test suite has been getting irritating > slow. > > A few minor comments: This patch would be clearer if it the > setq-to-let translation were a separate patch. It would also be worth > adding a big c

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Austin Clements
This looks like a great idea! The test suite has been getting irritating slow. A few minor comments: This patch would be clearer if it the setq-to-let translation were a separate patch. It would also be worth adding a big comment at the top of the test explaining why all of the tests let-bind ev

[PATCH] test:Folder tags shouldn't match after removal of file in given folder

2011-06-27 Thread Mark Anderson
Test for bug. Current stemming support for notmuch adds extra terms to the DB which aren't removed when the file renames are detected. When folder tags are added to a message, Xapian terms for both XFOLDER and ZXFOLDER are generated. When one of the filenames are renamed/removed, only the XFOLD

Re: Notmuch 0.6: Let's do it.

2011-06-27 Thread Jameson Graef Rollins
On Wed, 22 Jun 2011 22:26:06 -0300, David Bremner wrote: > 3) Cherry-pick/merge a small number of _important_ [2] bug fixes between now >and July 1. Hi, David. You might want to consider applying the following patches for 0.6: Bug fix for raw output of gmime parts: id:"1307120466-4980-1-g

Notmuch 0.6: Let's do it.

2011-06-27 Thread Jameson Graef Rollins
t;http://notmuchmail.org/pipermail/notmuch/attachments/20110627/370f1f32/attachment.pgp>

[PATCH] test:Folder tags shouldn't match after removal of file in given folder

2011-06-27 Thread Mark Anderson
Test for bug. Current stemming support for notmuch adds extra terms to the DB which aren't removed when the file renames are detected. When folder tags are added to a message, Xapian terms for both XFOLDER and ZXFOLDER are generated. When one of the filenames are renamed/removed, only the XFOLD

[PATCH] test:Improve test behaviors when --root is used

2011-06-27 Thread Mark Anderson
Change add_email_corpus, emacs_deliver_message and tests to use $TEST_DIRECTORY instead of '..'. This improves the behavior of the usage of --root=, as the assumption of '..' will be incorrect if the option is specified. Document -root option in README and update valgrind to work with -root. ---

Re: [PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Jameson Graef Rollins
On Thu, 23 Jun 2011 16:33:18 -0700, Carl Worth wrote: > I'd like to investigate this case a little bit to help answer the > question of whether "notmuch should have done anything in this case". Hi, Carl. You can see this error if you try to output raw a multipart/* or message/rfc822 part, ie: s

[PATCH] Do not attept to output part raw if part is not GMimePart.

2011-06-27 Thread Jameson Graef Rollins
bbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110627/bbbcddd4/attachment-0001.pgp>

notmuch Digest, Vol 20, Issue 57

2011-06-27 Thread Sander Boer
Hi all, I was wondering what a "best practice" would be in dealing with a gmail account and notmuch ? For instance, is this a possibility sync gmail tags with notmuch tags ? As fas as I am aware Gmail exposes its tags through imap folders, I am not too thrilled about the mixing of paradigms (fold

[PATCH] test:Improve test behaviors when --root is used

2011-06-27 Thread Mark Anderson
Change add_email_corpus, emacs_deliver_message and tests to use $TEST_DIRECTORY instead of '..'. This improves the behavior of the usage of --root=, as the assumption of '..' will be incorrect if the option is specified. Document -root option in README and update valgrind to work with -root. ---

[PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Before the change, every Emacs tests ran in a separate Emacs instance. Starting Emacs many times wastes considerable time and it gets worse as the test suite grows. The patch solves this by using a single Emacs server and emacsclient(1) to run multiple tests. Emacs server is started on the first

[PATCH 1/2] test: use emacs_deliver_message in Emacs SMTP send test

2011-06-27 Thread Dmitry Kurochkin
Minor changes to expected results of other Emacs tests were needed because the message Date header changed. --- test/emacs | 34 +- 1 files changed, 9 insertions(+), 25 deletions(-) diff --git a/test/emacs b/test/emacs index f3239ea..4f16b41 100755 --- a/test/ema

[PATCH 5/5] test: remove some sed(1) calls in Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Few Emacs tests used sed(1) to remove unexpected output in the beginning to avoid getting confused by messages such as "Parsing /home/cworth/.mailrc... done". This is no longer needed since tests are run in a temporary home directory instead of the user's one. So remove these sed(1) calls. --- t

[PATCH 4/5] test: save buffer content to file instead of printing it in Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Before the change, the common Emacs test scheme was to print buffer content to stdout and redirect it to a file or capture it in a shell variable. This does not work if we switch to using emacsclient(1) for running the tests, because you can not print to the stdout in this case. (Actually, you can

[PATCH 3/5] test: wrap and indent test_emacs calls

2011-06-27 Thread Dmitry Kurochkin
Most test_emacs calls have long arguments that consist of many expressions. Putting them on a single line makes it hard to read and produces poor diff when they are changed. The patch puts every expression in test_emacs calls on a separate line. --- test/emacs | 124 ++

[PATCH 2/5] test: cleanup test_emacs

2011-06-27 Thread Dmitry Kurochkin
Move auxiliary function definition and configuration from command line to test-lib.el. --- test/test-lib.el |8 test/test-lib.sh |9 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/test/test-lib.el b/test/test-lib.el index 9439996..344a02e 100644 --- a/tes

[PATCH 1/5] test: do not set `message-signature' in test_emacs

2011-06-27 Thread Dmitry Kurochkin
It is no longer needed since tests are run in a temporary home directory instead of the user's one. --- test/test-lib.sh |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index cc20f41..3ec388c 100755 --- a/test/test-lib.sh +++ b/test/te