[PATCH v4 6/6] test: add tests for notmuch search --first and --maxitems

2011-11-06 Thread Jani Nikula
Signed-off-by: Jani Nikula --- test/notmuch-test|1 + test/search-limiting | 71 ++ 2 files changed, 72 insertions(+), 0 deletions(-) create mode 100755 test/search-limiting diff --git a/test/notmuch-test b/test/notmuch-test index

[PATCH v4 5/6] test: add tests for notmuch count

2011-11-06 Thread Jani Nikula
Signed-off-by: Jani Nikula --- test/count| 40 test/notmuch-test |1 + 2 files changed, 41 insertions(+), 0 deletions(-) create mode 100755 test/count diff --git a/test/count b/test/count new file mode 100755 index 000..300b171 ---

[PATCH v4 4/6] cli: add support for --output parameter in notmuch count

2011-11-06 Thread Jani Nikula
Add support for --output=messages (which remains the default) and --output=threads to notmuch count. Signed-off-by: Jani Nikula --- NEWS|5 + notmuch-count.c | 18 -- notmuch.1 | 29 + 3 files changed, 46 insertions(+), 6

[PATCH v4 3/6] cli: drop unused code from notmuch count

2011-11-06 Thread Jani Nikula
Remove unused code within #if 0 blocks from notmuch count. Signed-off-by: Jani Nikula --- notmuch-count.c | 32 1 files changed, 0 insertions(+), 32 deletions(-) diff --git a/notmuch-count.c b/notmuch-count.c index 0d700a9..a35be40 100644 ---

[PATCH v4 2/6] cli: add options --first and --maxitems to notmuch search

2011-11-06 Thread Jani Nikula
Add options --first=[-]N and --maxitems=M to notmuch search to determine the first result and maximum number of results to display. Option --maxitems=M limits the maximum number of results to display to M. Option --first=[-]N skips the first N results; with the leading '-' skip until the Nth

[PATCH v4 1/6] lib: add function to get the number of threads matching a search

2011-11-06 Thread Jani Nikula
Add function notmuch_query_count_threads() to get the number of threads matching a search. This is done by performing a search and figuring out the number of unique thread IDs in the matching messages, a significantly heavier operation than notmuch_query_count_messages(). Signed-off-by: Jani

[PATCH v4 0/6] lib/cli: limit number of messages in search results

2011-11-06 Thread Jani Nikula
Hi, here's the fourth version of the output limiting patches, with the following minor changes since v3 (id:"cover.1320349030.git.jani at nikula.org"): * add spaces before parentheses in function calls (when will I learn?) * update man page * update NEWS * drop the emacs ui patch for now; it

[PATCH] Store "from" and "subject" headers in the database.

2011-11-06 Thread Jani Nikula
On Sun, 6 Nov 2011 12:17:36 -0500, Austin Clements wrote: > This is a rebase and cleanup of Istvan Marko's patch from > id:m3pqnj2j7a.fsf at zsu.kismala.com > > Search retrieves these headers for every message in the search > results. Previously, this required opening and parsing every message

[PATCH] Store "from" and "subject" headers in the database.

2011-11-06 Thread Daniel Schoepe
not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/2006/e6b33341/attachment-0001.pgp>

[RFC PATCH v2 3/3] emacs: support limiting the number of results shown in search results

2011-11-06 Thread Jani Nikula
Hi Austin, and many thanks for your comments. Before hacking on notmuch my lisp was mostly limited to ~/.emacs, and unfortunately it shows... On Fri, 4 Nov 2011 16:54:15 -0400, Austin Clements wrote: > Quoth Jani Nikula on Oct 31 at 11:18 pm: > > Add support for limiting the maximum number of

[PATCH] Store "from" and "subject" headers in the database.

2011-11-06 Thread Daniel Schoepe
re Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/2006/c9c9d4be/attachment.pgp>

python-notmuch decoding error on a message

2011-11-06 Thread Antoine Amarilli
: inline User-Agent: Mutt/1.5.21 (2010-09-15) Content-Length: 865 Lines: 2 test -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/2006/0f6ed35c/attachment-0001.pgp>

bug: RELEASING should cover version & date in notmuch.1

2011-11-06 Thread Jani Nikula
Hi, here's an actual bug for testing nmbug. ;) Current notmuch man page (notmuch.1) has version 0.1 and date 2009-10-31. RELEASING should include a step for updating those. Or they should be updated automagically by make. BR, Jani.

[PATCH] contrib/nmbug: new script for sharing tags with a given prefix.

2011-11-06 Thread David Bremner
From: David Bremner The main idea is consider the notmuch database as analogous to the work-tree. A bare git repo is maintained in the users home directory, with a tree of the form tags/$message-id/$tag Like notmuch and git, we have a set of subcommnds, mainly modelled on

[PATCH] Store "from" and "subject" headers in the database.

2011-11-06 Thread Austin Clements
On Sun, Nov 6, 2011 at 4:07 PM, Jani Nikula wrote: > On Sun, ?6 Nov 2011 12:17:36 -0500, Austin Clements > wrote: >> Taking full advantage of this requires a database rebuild, but it will >> fall back to the old behavior for messages that do not have headers >> stored in the database. > >

[PATCH v3 4/4] emacs: remove unused `point-invisible-p' function

2011-11-06 Thread Dmitry Kurochkin
`point-invisible-p' does not work correctly when `invisible' property is a list. There are standard `invisible-p' and related functions that should be used instead. --- emacs/notmuch-lib.el | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git

[PATCH v3 3/4] emacs: remove no longer used functions from notmuch-show.el

2011-11-06 Thread Dmitry Kurochkin
Remove `notmuch-show-move-past-invisible-backward' and `notmuch-show-move-past-invisible-forward' functions which are unused. --- emacs/notmuch-show.el |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

[PATCH v3 2/4] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive

2011-11-06 Thread Dmitry Kurochkin
Use `previous-single-char-property-change' instead of going through each character by hand and testing it's visibility. This fixes `notmuch-show-advance-and-archive' to work for the last message in thread with hidden signature. --- emacs/notmuch-show.el | 17 + 1 files changed,

[PATCH v3 1/4] test: `notmuch-show-advance-and-archive' with invisible signature

2011-11-06 Thread Dmitry Kurochkin
Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible signature. --- test/emacs | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index 0303d7d..1aa5299 100755 ---

[PATCH v2 4/7] test: `notmuch-show-advance-and-archive' with invisible signature

2011-11-06 Thread Dmitry Kurochkin
Hi David. On Sat, 05 Nov 2011 22:06:47 -0300, David Bremner wrote: > On Fri, 1 Jul 2011 08:55:19 +0400, Dmitry Kurochkin gmail.com> wrote: > > Add Emacs test to check that `notmuch-show-advance-and-archive' > > works for the last message in thread with invisible signature. > > I pushed the

[PATCH 1/3] notmuch-deliver: wait for the database to become unlocked

2011-11-06 Thread David Riebenbauer
If notmuch-deliver just gives up on a locked database this can result in mail bouncing. This patch makes it wait a given time and then retry to open the database. The wait time starts at a millisecond, and doubles every time the database is still locked, until an absolute maximum time of 10

[PATCH 0/3] notmuch-deliver: wait for database to become unlocked and test

2011-11-06 Thread David Riebenbauer
Hi, I noticed that mail would bounce in my setup, if the xapian database was locked while notmuch-deliver tried to run. My solution was to make it wait for some time adn retry. A test program for is alos included. Regards, David David Riebenbauer (3): notmuch-deliver: wait for the database

[PATCH] Store "from" and "subject" headers in the database.

2011-11-06 Thread Austin Clements
This is a rebase and cleanup of Istvan Marko's patch from id:m3pqnj2j7a.fsf at zsu.kismala.com Search retrieves these headers for every message in the search results. Previously, this required opening and parsing every message file. Storing them directly in the database significantly reduces IO

[PATCH 1/2] notmuch-deliver: Retry with readwrite if splice() fails

2011-11-06 Thread Ali Polatel
Hey, David Thanks for resending the patches! On Sun, Nov 06, 2011 at 06:34:27AM +0100, David Riebenbauer wrote: >notmuch-deliver should not just fail, when splice() doesn't work. Fall >back to the readwrite method even if NOTMUCH_DELIVER_NO_SPLICE is not >set. This is a trivial change but I'm

[PATCH 2/2] notmuch-deliver: in save_splice() log failures as debug.

2011-11-06 Thread David Riebenbauer
If we don't exit if splice fails then we should just log failures as debug instead of critical. --- contrib/notmuch-deliver/src/main.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/notmuch-deliver/src/main.c b/contrib/notmuch-deliver/src/main.c index

Re: [PATCH 1/2] notmuch-deliver: Retry with readwrite if splice() fails

2011-11-06 Thread Ali Polatel
Hey, David Thanks for resending the patches! On Sun, Nov 06, 2011 at 06:34:27AM +0100, David Riebenbauer wrote: notmuch-deliver should not just fail, when splice() doesn't work. Fall back to the readwrite method even if NOTMUCH_DELIVER_NO_SPLICE is not set. This is a trivial change but I'm

Re: [PATCH v2 4/7] test: `notmuch-show-advance-and-archive' with invisible signature

2011-11-06 Thread Dmitry Kurochkin
Hi David. On Sat, 05 Nov 2011 22:06:47 -0300, David Bremner da...@tethera.net wrote: On Fri, 1 Jul 2011 08:55:19 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible

[PATCH v3 1/4] test: `notmuch-show-advance-and-archive' with invisible signature

2011-11-06 Thread Dmitry Kurochkin
Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible signature. --- test/emacs | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index 0303d7d..1aa5299 100755 ---

[PATCH v3 2/4] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive

2011-11-06 Thread Dmitry Kurochkin
Use `previous-single-char-property-change' instead of going through each character by hand and testing it's visibility. This fixes `notmuch-show-advance-and-archive' to work for the last message in thread with hidden signature. --- emacs/notmuch-show.el | 17 + 1 files changed,

[PATCH v3 3/4] emacs: remove no longer used functions from notmuch-show.el

2011-11-06 Thread Dmitry Kurochkin
Remove `notmuch-show-move-past-invisible-backward' and `notmuch-show-move-past-invisible-forward' functions which are unused. --- emacs/notmuch-show.el |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

[PATCH v3 4/4] emacs: remove unused `point-invisible-p' function

2011-11-06 Thread Dmitry Kurochkin
`point-invisible-p' does not work correctly when `invisible' property is a list. There are standard `invisible-p' and related functions that should be used instead. --- emacs/notmuch-lib.el | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git

[PATCH 1/3] notmuch-deliver: wait for the database to become unlocked

2011-11-06 Thread David Riebenbauer
If notmuch-deliver just gives up on a locked database this can result in mail bouncing. This patch makes it wait a given time and then retry to open the database. The wait time starts at a millisecond, and doubles every time the database is still locked, until an absolute maximum time of 10

[PATCH 0/3] notmuch-deliver: wait for database to become unlocked and test

2011-11-06 Thread David Riebenbauer
Hi, I noticed that mail would bounce in my setup, if the xapian database was locked while notmuch-deliver tried to run. My solution was to make it wait for some time adn retry. A test program for is alos included. Regards, David David Riebenbauer (3): notmuch-deliver: wait for the database

[PATCH 3/3] notmuch-deliver: Convert test program to glib main loop.

2011-11-06 Thread David Riebenbauer
This makes reporting of success/failure more robust. --- contrib/notmuch-deliver/test/notmuch-lock.c | 103 +-- 1 files changed, 81 insertions(+), 22 deletions(-) diff --git a/contrib/notmuch-deliver/test/notmuch-lock.c b/contrib/notmuch-deliver/test/notmuch-lock.c

Re: [RFC PATCH v2 3/3] emacs: support limiting the number of results shown in search results

2011-11-06 Thread Jani Nikula
Hi Austin, and many thanks for your comments. Before hacking on notmuch my lisp was mostly limited to ~/.emacs, and unfortunately it shows... On Fri, 4 Nov 2011 16:54:15 -0400, Austin Clements amdra...@mit.edu wrote: Quoth Jani Nikula on Oct 31 at 11:18 pm: Add support for limiting the

Re: [PATCH] Store from and subject headers in the database.

2011-11-06 Thread Jani Nikula
On Sun, 6 Nov 2011 12:17:36 -0500, Austin Clements amdra...@mit.edu wrote: This is a rebase and cleanup of Istvan Marko's patch from id:m3pqnj2j7a@zsu.kismala.com Search retrieves these headers for every message in the search results. Previously, this required opening and parsing every

Re: [PATCH] Store from and subject headers in the database.

2011-11-06 Thread Daniel Schoepe
On Sun, 6 Nov 2011 12:17:36 -0500, Austin Clements amdra...@mit.edu wrote: Search retrieves these headers for every message in the search results. Previously, this required opening and parsing every message file. Storing them directly in the database significantly reduces IO and

[PATCH v4 0/6] lib/cli: limit number of messages in search results

2011-11-06 Thread Jani Nikula
Hi, here's the fourth version of the output limiting patches, with the following minor changes since v3 (id:cover.1320349030.git.j...@nikula.org): * add spaces before parentheses in function calls (when will I learn?) * update man page * update NEWS * drop the emacs ui patch for now; it needs

[PATCH v4 1/6] lib: add function to get the number of threads matching a search

2011-11-06 Thread Jani Nikula
Add function notmuch_query_count_threads() to get the number of threads matching a search. This is done by performing a search and figuring out the number of unique thread IDs in the matching messages, a significantly heavier operation than notmuch_query_count_messages(). Signed-off-by: Jani

[PATCH v4 3/6] cli: drop unused code from notmuch count

2011-11-06 Thread Jani Nikula
Remove unused code within #if 0 blocks from notmuch count. Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-count.c | 32 1 files changed, 0 insertions(+), 32 deletions(-) diff --git a/notmuch-count.c b/notmuch-count.c index 0d700a9..a35be40 100644 ---

[PATCH v4 4/6] cli: add support for --output parameter in notmuch count

2011-11-06 Thread Jani Nikula
Add support for --output=messages (which remains the default) and --output=threads to notmuch count. Signed-off-by: Jani Nikula j...@nikula.org --- NEWS|5 + notmuch-count.c | 18 -- notmuch.1 | 29 + 3 files changed, 46

[PATCH v4 5/6] test: add tests for notmuch count

2011-11-06 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- test/count| 40 test/notmuch-test |1 + 2 files changed, 41 insertions(+), 0 deletions(-) create mode 100755 test/count diff --git a/test/count b/test/count new file mode 100755 index

[PATCH v4 6/6] test: add tests for notmuch search --first and --maxitems

2011-11-06 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- test/notmuch-test|1 + test/search-limiting | 71 ++ 2 files changed, 72 insertions(+), 0 deletions(-) create mode 100755 test/search-limiting diff --git a/test/notmuch-test

Re: [PATCH] Store from and subject headers in the database.

2011-11-06 Thread Daniel Schoepe
On Sun, 06 Nov 2011 23:07:51 +0200, Jani Nikula j...@nikula.org wrote: ...what's the most convenient way of rebuilding the database while preserving my tags etc.? If this was merged, would an older version of notmuch choke on the rebuilt database with these headers? (To me it looks like it

Re: [PATCH] Store from and subject headers in the database.

2011-11-06 Thread Austin Clements
On Sun, Nov 6, 2011 at 4:07 PM, Jani Nikula j...@nikula.org wrote: On Sun,  6 Nov 2011 12:17:36 -0500, Austin Clements amdra...@mit.edu wrote: Taking full advantage of this requires a database rebuild, but it will fall back to the old behavior for messages that do not have headers stored in

Re: [PATCH] Store from and subject headers in the database.

2011-11-06 Thread Jani Nikula
On Sun, 6 Nov 2011 17:01:14 -0500, Austin Clements amdra...@mit.edu wrote: On Sun, Nov 6, 2011 at 4:07 PM, Jani Nikula j...@nikula.org wrote: On Sun,  6 Nov 2011 12:17:36 -0500, Austin Clements amdra...@mit.edu wrote: Taking full advantage of this requires a database rebuild, but it will

[PATCH] contrib/nmbug: new script for sharing tags with a given prefix.

2011-11-06 Thread David Bremner
From: David Bremner brem...@debian.org The main idea is consider the notmuch database as analogous to the work-tree. A bare git repo is maintained in the users home directory, with a tree of the form tags/$message-id/$tag Like notmuch and git, we have a set of subcommnds, mainly modelled on git.

Re: [PATCH 0/3] notmuch-deliver: wait for database to become unlocked and test

2011-11-06 Thread Ali Polatel
On Sun, Nov 06, 2011 at 12:23:01PM +0100, David Riebenbauer wrote: Hi, I noticed that mail would bounce in my setup, if the xapian database was locked while notmuch-deliver tried to run. I recall having this problem sometime ago... My solution was to make it wait for some time adn retry. A