Re: bug in emacs-ui ?

2011-06-28 Thread Jani Nikula
Carl Worth cworth@... writes: On Wed, 22 Jun 2011 08:50:23 +0200, Sebastien Binet seb.binet@... wrote: On Tue, 21 Jun 2011 15:09:20 -0700, Carl Worth cworth@... wrote: Perhaps this is an emacs bug? could be, but, I'm using Debian's emacs 23.3.1 and have not encountered the

[PATCH 0/4] emacs: find non-matching mails, plus small tweaks

2011-06-28 Thread Jani Nikula
Hi, I've found the following features useful with Emacs. Please have a look. And be gentle; these are my first lines of lisp I'm sharing in public, and perhaps not quite as lispy as I'd like them to be... :) Jani Jani Nikula (4): emacs: Add functions and bindings to archive and mark thread

[PATCH 1/4] emacs: Add functions and bindings to archive and mark thread as read

2011-06-28 Thread Jani Nikula
Add mark as read versions of the archive thread functions to archive and and mark each message in thread as read by removing the inbox and unread tags from the messages. Also add default keybindings A and X for them: shifted a and x also mark as read. --- emacs/notmuch-show.el | 25

[PATCH 2/4] emacs: Add option to make adding saved searches append, not prepend

2011-06-28 Thread Jani Nikula
Add new customization option notmuch-add-saved-search-appends to determine whether new saved searches should be appended to or inserted in front of saved searches. The default remains insert in front. --- emacs/notmuch-hello.el | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-)

[PATCH 3/4] emacs: Add pseudo saved search to match mail that no saved search matches

2011-06-28 Thread Jani Nikula
Add a pseudo saved search that matches all the mail that no other saved search matches. Add new customization option notmuch-saved-searches-nomatch to enable and name the pseudo saved search. --- emacs/notmuch-hello.el | 30 +++--- 1 files changed, 23 insertions(+), 7

[PATCH 4/4] emacs: Add pseudo tag to match all messages that have no tags

2011-06-28 Thread Jani Nikula
Add a pseudo tag that matches all the messages that have no tags. Add new customization option notmuch-tags-nomatch to enable and name the pseudo tag. --- emacs/notmuch-hello.el | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el

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

2011-06-29 Thread Jani Nikula
On Wed, 29 Jun 2011 09:10:19 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: On Wed, 29 Jun 2011 05:48:50 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: This patch series fixes the bug reported by Sebastien in [1]. I was able to reproduce it and confirm that the

Re: [PATCH 3/4] emacs: Add pseudo saved search to match mail that no saved search matches

2011-06-29 Thread Jani Nikula
On Wed, 29 Jun 2011 12:14:05 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: Non-text part: multipart/signed On Tue, 28 Jun 2011 07:31:31 +, Jani Nikula j...@nikula.org wrote: Add a pseudo saved search that matches all the mail that no other saved search matches. Add new

Re: [PATCH 3/4] emacs: Add pseudo saved search to match mail that no saved search matches

2011-06-29 Thread Jani Nikula
On Wed, 29 Jun 2011 13:49:18 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: Non-text part: multipart/signed On Wed, 29 Jun 2011 20:15:22 +, Jani Nikula j...@nikula.org wrote: So to clarify, do you prefer having on/off switches, or just enabling this without customization

[RFC PATCH 0/3] add user friendly date range search

2011-08-10 Thread Jani Nikula
://www.gnu.org/s/gnulib/MODULES.html#module=parse-datetime [3] http://www.gnu.org/s/gnulib/ Jani Nikula (1): lib: add gnulib get_date() based date range search Michal Sojka (2): Import date/time parser from GNU coreutils Compile the date/time parser into notmuch library Makefile.local

[RFC PATCH 2/3] Compile the date/time parser into notmuch library

2011-08-10 Thread Jani Nikula
From: Michal Sojka sojk...@fel.cvut.cz --- Makefile.local |3 + configure |8 ++ lib/Makefile.local |5 +- lib/config.h | 45 + lib/getdate.c | 185 +++- lib/getdate.h |9 +++

[RFC PATCH 3/3] lib: add gnulib get_date() based date range search

2011-08-10 Thread Jani Nikula
Add a custom value range processor to handle date: using get_date() from gnulib. This enables date (and time) searches of the form date:since..until, where since and until are expressions understood by get_date(), compatible with most GNU programs. For the date input formats, see the GNU coreutils

[PATCH] emacs: Sort saved searches

2011-09-02 Thread Jani Nikula
Display saved searches sorted, like tags are displayed. This only affects the display of the saved searches, not the order in which they are stored in .emacs. Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff

Re: [PATCH] emacs: Sort saved searches

2011-09-03 Thread Jani Nikula
On Sat, 03 Sep 2011 14:56:09 +0300, Tomi Ollila tomi.oll...@nixu.com wrote: On Fri 02 Sep 2011 15:28, Jani Nikula j...@nikula.org writes: Display saved searches sorted, like tags are displayed. This only affects the display of the saved searches, not the order in which they are stored

Re: [PATCH] emacs: Sort saved searches

2011-09-04 Thread Jani Nikula
On Sun, 04 Sep 2011 00:57:26 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: I personally think it's nice the way it is, such that the entry order in the customization variable is the display order. Users can then set the order however they prefer. Hmm. Let's look at this from

[PATCH v2 0/2] sort saved searches, again

2011-09-07 Thread Jani Nikula
than inserted in the beginning. BR, Jani. Jani Nikula (2): emacs: Add new customization option to sort saved searches emacs: Make saving new saved searches append, not prepend emacs/notmuch-hello.el | 28 ++-- 1 files changed, 26 insertions(+), 2 deletions

[PATCH v2 1/2] emacs: Add new customization option to sort saved searches

2011-09-07 Thread Jani Nikula
the default. The function only affects display of the saved searches, not the order in which they are stored by custom. Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch

[PATCH v2 2/2] emacs: Make saving new saved searches append, not prepend

2011-09-07 Thread Jani Nikula
Append new saved searches at the end of saved searches rather than insert in front. Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 6c8e265

[PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom

2011-09-07 Thread Jani Nikula
It was not possible to define custom filters or filter functions because the types were const. Remove const to allow editing. Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el b

[PATCH RESEND 0/2] emacs: sort saved searches

2011-09-23 Thread Jani Nikula
Hi, resending as this seems forgotten. Last time [1] there was no objections to this improved approach. BR, Jani. [1] id:cover.1315341018.git.j...@nikula.org Jani Nikula (2): emacs: Add new customization option to sort saved searches emacs: Make saving new saved searches append, not prepend

[PATCH RESEND 1/2] emacs: Add new customization option to sort saved searches

2011-09-23 Thread Jani Nikula
the default. The function only affects display of the saved searches, not the order in which they are stored by custom. Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch

[PATCH RESEND 2/2] emacs: Make saving new saved searches append, not prepend

2011-09-23 Thread Jani Nikula
Append new saved searches at the end of saved searches rather than insert in front. Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 6c8e265

[PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom

2011-09-23 Thread Jani Nikula
The :options keyword is not meaningful for function type. Also, it was not possible to enter nil value, contrary to the notmuch-mua-user-agent defcustom documentation. Specify the alternatives using choice type, taking nil into account. Signed-off-by: Jani Nikula j...@nikula.org --- emacs

Re: [PATCH v2] emacs: Support a message-mode switch function in notmuch-mua

2011-10-18 Thread Jani Nikula
Hi Thomas - AFAICT :options is not meaningful for a function type. I think you should use choice type for this instead. This allows sensible documentation for the choices in the customization interface too. I sent a patch earlier to fix a similar issue [1], please have a look at that for

Re: remote-notmuch.sh

2011-10-27 Thread Jani Nikula
On Wed, 26 Oct 2011 13:04:55 +0300, Tomi Ollila tomi.oll...@iki.fi wrote: The remote-notmuch.sh script on page http://notmuchmail.org/remoteusage/ starts to show it's age. As the notmuch command line interface has evolved (and emacs ui followed) it is not working in many cases anymore. I

Re: Patch review/application process

2011-10-27 Thread Jani Nikula
On Tue, 25 Oct 2011 22:42:33 +0200, Daniel Schoepe dan...@schoepe.org wrote: as many of you have probably noticed, the time after which patches are reviewed and/or applied is considerably higher lately than it was, for example, earlier this year. My subjective impression is that there is also

[RFC PATCH 0/3] lib/cli/emacs: limit number of messages in search results

2011-10-28 Thread Jani Nikula
@hackervisions.org id:8739gyw0zh@opensourcematters.org My approach is slightly different. I think it's easier and better to do this in lib rather than just in cli. BR, Jani. Jani Nikula (3): lib: add support for limiting the number of search results cli: add support for limiting the number of search

[RFC PATCH 1/3] lib: add support for limiting the number of search results

2011-10-28 Thread Jani Nikula
not be too difficult, as long as the library interface is properly thought out. Signed-off-by: Jani Nikula j...@nikula.org --- lib/notmuch.h |3 +++ lib/query.cc | 26 -- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index

[RFC PATCH 2/3] cli: add support for limiting the number of search results

2011-10-28 Thread Jani Nikula
As are these: $ notmuch search --output=messages --sort=oldest-first --maxitems=10 SEARCH $ notmuch search --output=messages --sort=oldest-first SEARCH | tail Note that N refers to the maximum amount of messages, even for --output=threads. Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-search.c | 10

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

2011-10-28 Thread Jani Nikula
-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el | 19 --- emacs/notmuch.el | 43 ++- 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 65fde75..16eecb6

Re: [RFC PATCH 2/3] cli: add support for limiting the number of search results

2011-10-29 Thread Jani Nikula
On Sat, 29 Oct 2011 19:30:50 +0200, Daniel Schoepe dan...@schoepe.org wrote: On Fri, 28 Oct 2011 23:59:30 +0300, Jani Nikula j...@nikula.org wrote: @@ -412,6 +413,14 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) fprintf (stderr, Invalid value for --sort: %s\n

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

2011-10-29 Thread Jani Nikula
On Sat, 29 Oct 2011 19:25:22 +0200, Daniel Schoepe dan...@schoepe.org wrote: On Fri, 28 Oct 2011 23:59:31 +0300, Jani Nikula j...@nikula.org wrote: Add support for limiting the maximum number of messages initially displayed in search results. When enabled, the search results will contain push

Re: [PATCH] xutil.c: remove duplicate copies, create new library libutil.a to contain xutil.

2011-10-31 Thread Jani Nikula
Hi David, this patch (commit 1dedfc90f6eee7cad10f1a1ceb39a7a1c4dbd1b1) broke my build with: CXX -O2 lib/libnotmuch.so.2.0.0 lib/message-file.o: In function `copy_header_unfolding': message-file.c:(.text+0xea): undefined reference to `xrealloc' lib/message-file.o: In function

Re: [PATCH] xutil.c: remove duplicate copies, create new library libutil.a to contain xutil.

2011-10-31 Thread Jani Nikula
On Mon, 31 Oct 2011 11:50:30 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: On Mon, 31 Oct 2011 09:20:13 +, Jani Nikula j...@nikula.org wrote: I don't have the time to debug this further right now, but I bisected the failure to this commit and did a clean clone to make

[RFC PATCH v2 0/3] lib/cli/emacs: limit number of messages in search results

2011-10-31 Thread Jani Nikula
it as RFC. It works for me, but patch 1 might be deemed unacceptable. BR, Jani. Jani Nikula (3): lib: add function to get the number of threads matching a search cli: add options --first and --maxitems to notmuch search emacs: support limiting the number of results shown in search results

[RFC PATCH v2 1/3] lib: add function to get the number of threads matching a search

2011-10-31 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

[RFC PATCH v2 2/3] cli: add options --first and --maxitems to notmuch search

2011-10-31 Thread Jani Nikula
-by: Jani Nikula j...@nikula.org --- notmuch-search.c | 67 - 1 files changed, 55 insertions(+), 12 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 6f04d9a..ceef6ac 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -194,13

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

2011-10-31 Thread Jani Nikula
-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el | 17 -- emacs/notmuch.el | 53 +++ 2 files changed, 62 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 65fde75..4ba13e3 100644

Re: [RFC PATCH v2 0/3] lib/cli/emacs: limit number of messages in search results

2011-10-31 Thread Jani Nikula
On Mon, 31 Oct 2011 14:44:29 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: Hi, Jani. Thanks for working on this. This should also be valuable for vim users. Thanks for your interest! :) In order to push forward with this, though, I think we really need to have a complete

Re: [RFC PATCH v2 0/3] lib/cli/emacs: limit number of messages in search results

2011-11-02 Thread Jani Nikula
On Tue, 01 Nov 2011 09:30:56 -0300, David Bremner da...@tethera.net wrote: Is just because it add a function to the library that you think this might be problematic? I don't think we are super-dogmatic about the library never growing. When notmuch started, there were no bindings, so in

[PATCH v3 0/7] lib/cli/emacs: limit number of messages in search results

2011-11-04 Thread Jani Nikula
nor when (and maxitems ( 0 maxitems)) is nil. Jani Nikula (7): lib: add function to get the number of threads matching a search cli: add options --first and --maxitems to notmuch search cli: drop unused code from notmuch count cli: add support for --output parameter in notmuch count test

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

2011-11-04 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 v3 3/7] cli: drop unused code from notmuch count

2011-11-04 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 v3 2/7] cli: add options --first and --maxitems to notmuch search

2011-11-04 Thread Jani Nikula
result from the end (showing a total of N results if within bounds of the total number of results and not limited with --maxitems). Note that --first with a negative N for thread or summary output requires counting the number of matching threads in advance. Signed-off-by: Jani Nikula j...@nikula.org

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

2011-11-04 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 --- notmuch-count.c | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/notmuch-count.c b/notmuch-count.c index

[PATCH v3 5/7] test: add tests for notmuch count

2011-11-04 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 000

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

2011-11-04 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 b/test/notmuch

[PATCH v3 7/7] emacs: support limiting the number of results shown in search results

2011-11-04 Thread Jani Nikula
-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el | 17 -- emacs/notmuch.el | 53 +++ 2 files changed, 62 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 65fde75..4ba13e3 100644

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. ___ notmuch mailing

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

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

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

2011-11-06 Thread Jani Nikula
some rework (see id:2004205415.gj22...@mit.edu) BR, Jani. Jani Nikula (6): lib: add function to get the number of threads matching a search cli: add options --first and --maxitems to notmuch search cli: drop unused code from notmuch count cli: add support for --output parameter

[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 2/6] cli: add options --first and --maxitems to notmuch search

2011-11-06 Thread Jani Nikula
result from the end (showing a total of N results if within bounds of the total number of results and not limited with --maxitems). Note that --first with a negative N for thread or summary output requires counting the number of matching threads in advance. Signed-off-by: Jani Nikula j...@nikula.org

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

[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 b/test/notmuch

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

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

2011-11-09 Thread Jani Nikula
FWIW, I reviewed this and didn't find any obvious problems. A few nitpicks below, though. BR, Jani. On Mon, 7 Nov 2011 22:55:23 -0500, Austin Clements amdra...@mit.edu wrote: This optimizes the user's tagging query to exclude messages that won't be affected by the tagging operation, saving

[PATCH 0/1] add some constraints to tag contents

2011-11-10 Thread Jani Nikula
be in lib rather than cli, but it's a start for a discussion on what's an acceptable tag really. BR, Jani. Jani Nikula (1): cli: add some constraints to tags notmuch-client.h |1 + notmuch-tag.c| 20 2 files changed, 21 insertions(+), 0 deletions(-) -- 1.7.5.4

Re: [PATCH] add `tag:' prefix to `--output=tags' results

2011-11-13 Thread Jani Nikula
On Sat, 12 Nov 2011 10:17:30 -0500, David Bremner da...@tethera.net wrote: On Thu, 30 Jun 2011 10:20:29 +0200, Pieter Praet pie...@praet.org wrote: Alter `do_search_tags()' to prepend each result with `tag:', and update affected test. This makes its output consistent with

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

2011-11-13 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 v5 2/6] cli: add options --first and --maxitems to notmuch search

2011-11-13 Thread Jani Nikula
result from the end (showing a total of N results if within bounds of the total number of results and not limited with --maxitems). Note that --first with a negative N for thread or summary output requires counting the number of matching threads in advance. Signed-off-by: Jani Nikula j...@nikula.org

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

2011-11-13 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 v5 6/6] test: add tests for notmuch search --first and --maxitems

2011-11-13 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 b/test/notmuch

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

2011-11-13 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 v6 3/6] cli: drop unused code from notmuch count

2011-11-13 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 v6 4/6] cli: add support for --output parameter in notmuch count

2011-11-13 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 + notmuch.c

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

2011-11-13 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 000

[PATCH 0/6] cli getoptification

2011-11-13 Thread Jani Nikula
the original. All the tests pass after patch 6/6. BR, Jani. Jani Nikula (6): cli: notmuch new: use getopt_long for parsing command line options cli: notmuch search: use getopt_long for parsing command line options cli: notmuch show: use getopt_long for parsing command line options cli: notmuch

[PATCH 1/6] cli: notmuch new: use getopt_long for parsing command line options

2011-11-13 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-client.h |1 + notmuch-new.c| 20 +++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index b50cb38..eb16f0d 100644 --- a/notmuch-client.h +++ b/notmuch-client.h

[PATCH 2/6] cli: notmuch search: use getopt_long for parsing command line options

2011-11-13 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-search.c | 90 - 1 files changed, 48 insertions(+), 42 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index c62a594..4f7384a 100644 --- a/notmuch-search.c +++ b/notmuch

[PATCH 3/6] cli: notmuch show: use getopt_long for parsing command line options

2011-11-13 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-show.c | 61 --- 1 files changed, 35 insertions(+), 26 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 603992a..73b4557 100644 --- a/notmuch-show.c +++ b/notmuch-show.c

[PATCH 4/6] cli: notmuch count: use getopt_long for parsing command line options

2011-11-13 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-count.c | 33 ++--- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git a/notmuch-count.c b/notmuch-count.c index 20ce334..4987ca8 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -28,34 +28,37

[PATCH 6/6] test: emacs-large-search-buffer: expected results according to getopt_long

2011-11-13 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- test/emacs-large-search-buffer |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/emacs-large-search-buffer b/test/emacs-large-search-buffer index 6095e9d..1bdffac 100755 --- a/test/emacs-large-search-buffer +++ b/test

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

2011-11-16 Thread Jani Nikula
v7, s/--first/--offset/ and s/--maxitems/--limit/ and rebased against master since since id:cover.1321217854.git.j...@nikula.org BR, Jani. Jani Nikula (6): lib: add function to get the number of threads matching a search cli: add options --offset and --limit to notmuch search cli: drop

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

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

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

2011-11-16 Thread Jani Nikula
On Tue, 15 Nov 2011 19:41:57 -0400, David Bremner da...@tethera.net wrote: On Tue, 15 Nov 2011 22:08:47 +0200, Jani Nikula j...@nikula.org wrote: v7, s/--first/--offset/ and s/--maxitems/--limit/ and rebased against master since since id:cover.1321217854.git.j...@nikula.org Pushed

[PATCH v7 2/6] cli: add options --offset and --limit to notmuch search

2011-11-16 Thread Jani Nikula
from the end. Note that --offset with a negative N for thread or summary output requires counting the number of matching threads in advance. Signed-off-by: Jani Nikula j...@nikula.org --- NEWS |5 notmuch-search.c | 68

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

2011-11-16 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 v7 6/6] test: add tests for notmuch search --offset and --limit

2011-11-16 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 b/test/notmuch

Re: [PATCH 2/2] NEWS: fix some old typos and trailing whitespace

2011-11-16 Thread Jani Nikula
On Nov 16, 2011 11:39 PM, Pieter Praet pie...@praet.org wrote: On Wed, 16 Nov 2011 22:54:35 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Wed, 16 Nov 2011 21:37:50 +0100, Pieter Praet pie...@praet.org wrote: No further explanation needed. --- NEWS | 14 +++--- 1 files

[DRAFT PATCH] emacs: support limiting the number of results shown in search results

2011-11-18 Thread Jani Nikula
-by: Jani Nikula j...@nikula.org --- Note: This is not intended for inclusion yet. It works, but I'd like to try to simplify things a bit (in this patch and otherwise) by keeping the relevant variables buffer local over notmuch-search-refresh-view. This would mean not killing the search buffer

FYI: gmail contacts as notmuch emacs addressbook

2011-11-18 Thread Jani Nikula
This is a really simple read-only setup for using gmail contacts as notmuch addressbook, but perhaps there are people who find this useful: 1) Install goobook http://code.google.com/p/goobook/. On a Debian based system you might be able do it with: $ sudo apt-get install python-pip $ sudo pip

[PATCH] emacs: create patch filename from subject for inline patch fake parts

2011-11-18 Thread Jani Nikula
Use the mail subject line for creating a descriptive filename for the wash generated inline patch fake parts. The names are similar to the ones created by 'git format-patch', just without the leading numbers. Signed-off-by: Jani Nikula j...@nikula.org --- I know notmuch-subject-to-patch

[RFC PATCH 1/2] emacs: allow functions as saved searches

2011-11-24 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el |9 +++-- emacs/notmuch-lib.el |8 ++-- emacs/notmuch.el |9 +++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 0582cae

[RFC PATCH 2/2] emacs: a couple of example functions that might be useful with saved searches

2011-11-24 Thread Jani Nikula
Signed-off-by: Jani Nikula j...@nikula.org --- emacs/notmuch-hello.el | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index ad3ae74..f03e4b9 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el

Re: [PATCH] test: add simple tests for online help

2011-11-27 Thread Jani Nikula
On Fri, 25 Nov 2011 13:36:26 -0500, David Bremner da...@tethera.net wrote: I think Jani was just making fun of me when he suggested tests for notmuch --help, but I thought, why not. Heh, I was only half joking - it is certainly good practice to create tests for any bugs found and fixed. It's a

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

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

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

2011-11-29 Thread Jani Nikula
Hi, generally looks good to me, but please find a few comments below. BR, Jani. On Sun, 27 Nov 2011 21:21:09 -0500, Austin Clements amdra...@mit.edu wrote: This wraps all of the complex MIME part handling in a single, simple function that gets part N from *any* MIME object, so traversing a

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

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

[PATCH 1/2] cli: add mechanism for running user configurable hooks

2011-12-02 Thread Jani Nikula
, as this is slightly artificial as it is. Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-client.h |7 +++ notmuch-config.c | 21 + notmuch-new.c| 25 + 3 files changed, 53 insertions(+), 0 deletions(-) diff --git a/notmuch-client.h

[PATCH 2/2] cli: add support for running notmuch new pre and post hooks

2011-12-02 Thread Jani Nikula
(manpage and help). Signed-off-by: Jani Nikula j...@nikula.org --- notmuch-client.h |3 ++- notmuch-config.c | 16 +++- notmuch-new.c|9 + 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index 5e2fed2..d2ebc73 100644

Re: [PATCH 1/2] cli: add mechanism for running user configurable hooks

2011-12-02 Thread Jani Nikula
On Fri, 2 Dec 2011 23:00:05 +0200, Jani Nikula j...@nikula.org wrote: TODO: I meant these as RFC, but forgot to add the subject prefix. Jani. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v2 1/2] cli: introduce the concept of user defined hooks

2011-12-03 Thread Jani Nikula
() function at an appropriate location with the hook name. Signed-off-by: Jani Nikula j...@nikula.org --- v2: Switch to git style hooks in a hook directory as suggested by Austin Clements in IRC. Update manpage and add polish. --- Makefile.local |1 + notmuch-client.h |3 ++ notmuch-hook.c

Re: [PATCH v2 1/2] cli: introduce the concept of user defined hooks

2011-12-04 Thread Jani Nikula
On Sat, 3 Dec 2011 22:42:10 -0500, Austin Clements amdra...@mit.edu wrote: I like it. See below for some nits. Thanks for the review! Quoth Jani Nikula on Dec 04 at 1:16 am: Add mechanism for running user defined hooks. Hooks are executables or symlinks to executables stored under

Re: [PATCH v2 2/2] cli: add support for pre and post notmuch new hooks

2011-12-04 Thread Jani Nikula
On Sat, 3 Dec 2011 23:00:47 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Jani Nikula on Dec 04 at 1:16 am: Run notmuch new pre and post hooks, named pre-new and post-new, if present in the notmuch hooks directory. The hooks will be run before and after incorporating new messages

Re: [PATCH v2 2/2] cli: add support for pre and post notmuch new hooks

2011-12-04 Thread Jani Nikula
On Sun, 04 Dec 2011 11:46:38 -0500, Tom Prince tom.pri...@ualberta.net wrote: On Sun, 4 Dec 2011 01:16:49 +0200, Jani Nikula j...@nikula.org wrote: Run notmuch new pre and post hooks, named pre-new and post-new, if present in the notmuch hooks directory. The hooks will be run before

[PATCH v3 2/2] cli: add support for pre and post notmuch new hooks

2011-12-06 Thread Jani Nikula
, and custom tagging of the mail incorporated to the database. Also add command line option --no-hooks to notmuch new to bypass the hooks. Signed-off-by: Jani Nikula j...@nikula.org --- NEWS | 10 ++ notmuch-new.c | 12 notmuch.1 | 50

  1   2   3   4   5   6   7   8   9   10   >