[PATCH] dump: Don't sort.

2011-10-29 Thread Thomas Schwinge
From: Thomas Schwinge tho...@schwinge.name This improves usage experience considerably in the given scenario. --- Hi! I decided that it'd be useful to put the reasoning and data right next to the source code (as opposed to putting it into the commit message), for the next guy to read this

[PATCH] restore: Be more liberal in which data to accept.

2011-10-29 Thread Thomas Schwinge
From: Thomas Schwinge tho...@schwinge.name There are ``Message-ID''s out in the wild that contain spaces. --- Hi! Carl, the main question for you is: does this break sup-import operability? Spammers are quite inventive for creating ``interesting Messages-ID''s. Apparently, notmuch handles

[Patch 2/3] Respect window margins in notmuch-hello.el

2011-10-29 Thread Ivy Foster
Hello again, folks, The following patch makes notmuch take window margins into account when calculating the width of the notmuch-hello window in Emacs. As a side benefit (so that I only had to write the code once), I've added a named function to return said width. Folks using linum-mode should

[PATCH 3/3] Add notmuch-hello-mode-hook

2011-10-29 Thread Ivy Foster
The following patch adds a mode-hook to notmuch-hello-mode. Not much else to say, really. Would people find hooks for before and/or after adding the tags useful? Or hooks elsewhere in this mode (or other modes)? iff Signed-off-by: Ivy Foster joyfulg...@archlinux.us From

Experimental Tag Sharing

2011-10-29 Thread David Bremner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 OK, here is my rough and ready attempt at tag sharing. I figure we can smooth out the rough edges if/when we agree on a set of tags and preferably on an on-disk format. How to play? - - Apply all the patches in this thread (starting

[PATCH] contrib/nmbug: new script for sharing tags with prefix notmuch::

2011-10-29 Thread David Bremner
From: David Bremner brem...@debian.org In this initial version, we take care of only the base import and export of the appropriate tags in line oriented format amenable to easy merging. The current plan to use git to share tags and resolve conflicts. --- contrib/nmbug | 69

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

2011-10-29 Thread Daniel Schoepe
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 buttons to double the number of messages displayed or to show unlimited

[PATCH v2] contrib/nmbug: new script for sharing tags with prefix notmuch::

2011-10-29 Thread David Bremner
From: David Bremner brem...@debian.org In this initial version, we take care of import and export of the appropriate tags in line oriented format amenable to easy merging. We also provide (not very robust/clever) commands commit/push/pull to deal with a git repo that as already been set up. ---

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

2011-10-29 Thread Daniel Schoepe
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, opt); return 1; } + } else if (STRNCMP_LITERAL

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

2011-10-29 Thread David Bremner
On Sun, 23 Oct 2011 12:18:53 -0300, David Bremner da...@tethera.net wrote: From: David Bremner brem...@debian.org We keep the lib/xutil.c version. As a consequence, also factor out _internal_error and associated macros. It might be overkill to make a new file error_util.c for this, but

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 2/3] cli: add support for limiting the number of search results

2011-10-29 Thread Daniel Schoepe
On Sat, 29 Oct 2011 23:08:04 +0300, Jani Nikula j...@nikula.org wrote: strtoul() won't touch the data pointed to by p (it only modifies p), so in that sense it could be const, but you're right in that it really should be 'char *', just for a more complicated reason. Thanks for making me look

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

[PATCH] docs: man, online help, and NEWS updated for notmuch restore --match

2011-10-29 Thread David Bremner
From: David Bremner brem...@debian.org I also reformatted the notmuch restore --accumulate docs to make it work better with multiple options. --- Better late docs than no docs... also pushed to branch nmbug on git://pivot.cs.unb.ca/notmuch.git NEWS | 12 notmuch.1 | 19

Re: [PATCH] contrib/nmbug: new script for sharing tags with prefix notmuch::

2011-10-29 Thread Ali Polatel
On Sat, Oct 29, 2011 at 01:45:07PM -0300, David Bremner wrote: From: David Bremner brem...@debian.org In this initial version, we take care of only the base import and export of the appropriate tags in line oriented format amenable to easy merging. The current plan to use git to share tags and

Re: [PATCH] contrib/nmbug: new script for sharing tags with prefix notmuch::

2011-10-29 Thread David Bremner
On Sun, 30 Oct 2011 00:11:35 +0300, Ali Polatel pola...@gmail.com wrote: ^^ I'd make that: #!/usr/bin/env bash for systems where bash is not the default shell. OK, I'll do that in the next version. I always forget about those people who install bash in funny places. d

Re: [PATCH] contrib/nmbug: new script for sharing tags with prefix notmuch::

2011-10-29 Thread Ali Polatel
On Sat, Oct 29, 2011 at 07:12:52PM -0300, David Bremner wrote: On Sun, 30 Oct 2011 00:11:35 +0300, Ali Polatel pola...@gmail.com wrote: ^^ I'd make that: #!/usr/bin/env bash for systems where bash is not the default shell. OK, I'll do that in the next version. I always forget about those

Re: Experimental Tag Sharing

2011-10-29 Thread Jameson Graef Rollins
On Sat, 29 Oct 2011 13:45:06 -0300, David Bremner da...@tethera.net wrote: OK, here is my rough and ready attempt at tag sharing. I figure we can smooth out the rough edges if/when we agree on a set of tags and preferably on an on-disk format. Great! Thank you so much for working on this,

Re: Experimental Tag Sharing

2011-10-29 Thread David Bremner
On Sat, 29 Oct 2011 17:44:56 -0700, Jameson Graef Rollins jroll...@finestructure.net wrote: On Sat, 29 Oct 2011 13:45:06 -0300, David Bremner da...@tethera.net wrote: These patches did not apply cleanly for me from the list. I was able to get them from bremner's nmbug branch [0], though.

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

2011-10-29 Thread Jani Nikula
Hi, here are a few RFC patches that add support for limiting the number of messages in search results. The main goal was emacs; the lib/cli patches could probably be better thought out to be more general. The emacs interface was inspired by vc-print-log in Emacs vc.el. You'll get buttons [Show 2X

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

2011-10-29 Thread Jani Nikula
Add a function to support limiting the number of messages in search results. This is a fairly straightforward implementation just to support the following patches. The proper design should probably support paging of results (i.e. first give me results 0...49, then 50...99, etc.) That should not be

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

2011-10-29 Thread Jani Nikula
Add command line parameter --maxitems=N to notmuch search to limit the number of displayed messages to N. These two are equal: $ notmuch search --output=messages --sort=newest-first --maxitems=10 SEARCH $ notmuch search --output=messages --sort=newest-first SEARCH | head As are these: $

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

2011-10-29 Thread Jani Nikula
Add support for limiting the maximum number of messages initially displayed in search results. When enabled, the search results will contain push buttons to double the number of messages displayed or to show unlimited messages. The approach is inspired by vc-print-log in Emacs vc.el.

No subject

2011-10-29 Thread David Bremner
These still need doc updates, but you can probably figure how to use them by reviewing the patches ;).

[PATCH 1/4] notmuch-restore: add tests for new --match command line argument.

2011-10-29 Thread David Bremner
From: David Bremner The syntax is notmuch restore --match=regex We check here that - missing regex fails - bad regex fails - good regex succeeds (at least the command line argument parsing). --- test/dump-restore | 17 - 1 files changed, 16 insertions(+),

[PATCH 3/4] test/dump-restore: add tests for notmuch restore --match

2011-10-29 Thread David Bremner
From: David Bremner The first test passes now because it only needs command line parsing. The other three are marked broken, with functionality to follow. --- test/dump-restore | 43 +++ 1 files changed, 43 insertions(+), 0

[PATCH 4/4] notmuch-restore: implement --match functionality

2011-10-29 Thread David Bremner
From: David Bremner notmuch restore --match= will for each message in the dump file, delete any tags from the database matching and add any from the dump file matching . I tried to keep this simple, so in particular turning on regex matching disables one of the

[PATCH 2/4] notmuch-restore: implement argument parsing for --match

2011-10-29 Thread David Bremner
From: David Bremner - recognize the --match option - require an argument - check the argument is a correct regex. Currently the arguments are ignored after parsing. Note that we have to be a bit careful to avoid creating a resource leak here by error returning before calling

[PATCH] dump: Don't sort.

2011-10-29 Thread Thomas Schwinge
From: Thomas Schwinge This improves usage experience considerably in the given scenario. --- Hi! I decided that it'd be useful to put the reasoning and data right next to the source code (as opposed to putting it into the commit message), for the next guy to read this

[PATCH] restore: Be more liberal in which data to accept.

2011-10-29 Thread Thomas Schwinge
From: Thomas Schwinge There are ``Message-ID''s out in the wild that contain spaces. --- Hi! Carl, the main question for you is: does this break sup-import operability? Spammers are quite inventive for creating ``interesting Messages-ID''s. Apparently, notmuch handles

[Patch 2/3] Respect window margins in notmuch-hello.el

2011-10-29 Thread Ivy Foster
Hello again, folks, The following patch makes notmuch take window margins into account when calculating the width of the notmuch-hello window in Emacs. As a side benefit (so that I only had to write the code once), I've added a named function to return said width. Folks using linum-mode should

[PATCH 3/3] Add notmuch-hello-mode-hook

2011-10-29 Thread Ivy Foster
The following patch adds a mode-hook to notmuch-hello-mode. Not much else to say, really. Would people find hooks for before and/or after adding the tags useful? Or hooks elsewhere in this mode (or other modes)? iff Signed-off-by: Ivy Foster >From e8cdead0222fc85dd01d8a0185b54aed5e0a6e1e Mon

Experimental Tag Sharing

2011-10-29 Thread David Bremner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 OK, here is my rough and ready attempt at tag sharing. I figure we can smooth out the rough edges if/when we agree on a set of tags and preferably on an on-disk format. How to play? - - Apply all the patches in this thread (starting

[PATCH] contrib/nmbug: new script for sharing tags with prefix notmuch::

2011-10-29 Thread David Bremner
From: David Bremner In this initial version, we take care of only the base import and export of the appropriate tags in line oriented format amenable to easy merging. The current plan to use git to share tags and resolve conflicts. --- contrib/nmbug | 69

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

2011-10-29 Thread Daniel Schoepe
with-completion "Filter by tag: "))) > - (notmuch-search (concat notmuch-search-query-string " and tag:" tag) > notmuch-search-oldest-first)) > + (notmuch-search (concat notmuch-search-query-string " and tag:" >tag) notmuch-search-oldest-first notmuch-search-maxitems)) Same here. Cheers, Daniel -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111029/fb564033/attachment.pgp>

[PATCH v2] contrib/nmbug: new script for sharing tags with prefix notmuch::

2011-10-29 Thread David Bremner
From: David Bremner In this initial version, we take care of import and export of the appropriate tags in line oriented format amenable to easy merging. We also provide (not very robust/clever) commands commit/push/pull to deal with a git repo that as already been set up.

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

2011-10-29 Thread Daniel Schoepe
therwise, gcc will produce a warning about this). Cheers, Daniel -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111029/0d510152/attachment.pgp>

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

2011-10-29 Thread David Bremner
--- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 315 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111029/60aabf1c/attachment-0001.pgp> -- next part -- A non-text attachm

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

2011-10-29 Thread Daniel Schoepe
char *" and "char const *". -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111029/89ea91d2/attachment.pgp>

[PATCH] docs: man, online help, and NEWS updated for notmuch restore --match

2011-10-29 Thread David Bremner
From: David Bremner I also reformatted the notmuch restore --accumulate docs to make it work better with multiple options. --- Better late docs than no docs... also pushed to branch nmbug on git://pivot.cs.unb.ca/notmuch.git NEWS | 12 notmuch.1 | 19

notmuch in Emacs very slow

2011-10-29 Thread notm...@bontempi.net
Hello, I would like to report my experience with notmuch (newbie here). I absolutely love it. I would like very much to continue using it, but I am having a speed issue from inside Emacs. I have installed notmuch 0.9, on OS X 10.6, using of course the chert database format. I am also using