[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=dir, 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 cwo...@cworth.org 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

[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

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 da...@tethera.net 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:

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

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 amdra...@mit.edu 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

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 dmitry.kuroch...@gmail.com wrote: On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements amdra...@mit.edu 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.  

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 jroll...@finestructure.net wrote: On Thu, 23 Jun 2011 16:33:18 -0700, Carl Worth cwo...@cworth.org 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.

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

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 ma.sk...@gmail.com 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

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 thin.

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 l.rill...@av7.net 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

Re: [PATCH] fix sum moar typos

2011-06-27 Thread Carl Worth
On Fri, 24 Jun 2011 22:04:13 +0200, Pieter Praet pie...@praet.org 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

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 amdra...@mit.edu 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

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

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 amdra...@mit.edu 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

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 individually,

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 amdra...@mit.edu wrote: On Mon, Jun 27, 2011 at 1:12 PM, Mark Anderson ma.sk...@gmail.com wrote: +test_begin_subtest Test matches folder:spam +output=$(notmuch search folder:spam) +test_expect_equal $output thread:0001  

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 amdra...@mit.edu 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

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 dmitry.kuroch...@gmail.com wrote: On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements amdra...@mit.edu wrote: This looks like a great idea! The test suite has been getting irritating slow. A few minor comments: This patch

Re: Notmuch scripts

2011-06-27 Thread Ben Gamari
On Fri, 24 Jun 2011 11:29:21 -0700, Carl Worth cwo...@cworth.org 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,

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 d...@fifthhorseman.net 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,

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 aggressively

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 amdra...@mit.edu 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

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 still

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

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

[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

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

[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

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

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

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

[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

[PATCH] libnotmuch: build symbols list without relying on gcc -aux-info.

2011-06-27 Thread da...@tethera.net
From: David Bremner Carl reports "gcc -aux-info notmuch.aux lib/notmuch.h" does not generate notmuch.aux for him with Debian gcc 4.6.0-8. Based on a suggestion by Austin Clements, this version uses objdump to get the symbols from the object files. Any symbol that - is

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

[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

[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] Do not attept to output part raw if part is not GMimePart.

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

Notmuch 0.6: Let's do it.

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

[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

[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

[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

[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

[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

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

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

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

2011-06-27 Thread Carl Worth
ou. -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>

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

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

[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

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

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

[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

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

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