Re: [notmuch] semi-usable notmuch-gtk client

2009-12-07 Thread Chris Wilson
was an idea that Chris Wilson had almost immediately after playing with notmuch. I think he even started poking around in the Anjal code base to see how much work this would be. Chris, did you make any progress worth mentioning in your investigations? Before being distracted again

[notmuch] [PATCH] [RFC] notmuch search: Return a non-zero exitcode if the search returns no hits.

2010-01-15 Thread Chris Wilson
If the user is explicitly searching for a message, then if notmuch fails to find it, it is useful to set a failure exit code. This makes it easier for scripting. However, we will want to then distinguish between fatal errors (such as out-of-memory, invalid arguments, corrupt db, etc) from the

[PATCH] Makefile: specify libnotmuch.so location with -rpath

2010-04-25 Thread Chris Wilson
In order to handle installation into user directories, it is convenient to encode the library location into the search path for the notmuch executable. This is achieved for the GNU linker with the -rpath argument. --- Makefile.local |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

Re: [PATCH] Add a few tests for searching LWN emails.

2011-01-29 Thread Chris Wilson
is defined in http://www.faqs.org/rfcs/rfc2822.html in particular section 3.2.4. From that it appears the unquoted use of [a-Z][.a-Z]* is valid. However, I shall leave the intricacies to those whose understand and appreciate the whole problem... -Chris -- Chris Wilson, Intel Open Source Technology

[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once

2009-11-18 Thread Chris Wilson
Currently the same `pkg-config ...` is executed for every target, so just store the results in a variable. --- Makefile |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 96aaa73..023b2ec 100644 --- a/Makefile +++ b/Makefile @@ -4,15 +4,16

[notmuch] [PATCH 2/2] reply: Pointer mismatch.

2009-11-18 Thread Chris Wilson
Apparently typeof (size_t) != unsigned int on my x86-64. --- notmuch-reply.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 4a4a782..344b6e3 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -78,7 +78,7 @@ address_is_users

[notmuch] Recommended Coding Style?

2009-11-20 Thread Chris Wilson
may not change to a more kernel style, but he definitely will not mandate 3-space indents. ;-) -ickle -- Chris Wilson, Intel Open Source Technology Centre

[notmuch] [PATCH] Makefile: Magic silent rules.

2009-11-21 Thread Chris Wilson
Use the facilities of GNU make to create a magic function that will on the first invocation print a description of how to enable verbose compile lines and then print the quiet rule. Signed-off-by: Chris Wilson Signed-off-by: Carl Worth Cc: Mikhail Gusarov --- Makefile | 18

[notmuch] [PATCH] Makefile: Magic silent rules.

2009-11-21 Thread Chris Wilson
Use the facilities of GNU make to create a magic function that will on the first invocation print a description of how to enable verbose compile lines and then print the quiet rule. Signed-off-by: Chris Wilson Signed-off-by: Carl Worth Cc: Mikhail Gusarov --- Makefile | 22

[notmuch] [PATCH] Permit opening the notmuch database in read-only mode.

2009-11-21 Thread Chris Wilson
We only rarely need to actually open the database for writing, but we always create a Xapian::WritableDatabase. This has the effect of preventing searches and like whilst updating the index. Signed-off-by: Chris Wilson Acked-by: Carl Worth --- lib/database-private.h |3 ++- lib/database.cc

[notmuch] [PATCH] Permit opening the notmuch database in read-only mode.

2009-11-21 Thread Chris Wilson
We only rarely need to actually open the database for writing, but we always create a Xapian::WritableDatabase. This has the effect of preventing searches and like whilst updating the index. Signed-off-by: Chris Wilson Acked-by: Carl Worth [ickle: Updated to add WRITABLE mode to notmuch-new

[notmuch] [PATCH] Makefile: Magic silent rules.

2009-11-21 Thread Chris Wilson
Use the facilities of GNU make to create a magic function that will on the first invocation print a description of how to enable verbose compile lines and then print the quiet rule. Signed-off-by: Chris Wilson Signed-off-by: Carl Worth Cc: Mikhail Gusarov [ickle: Rebased, and duplicate

[notmuch] [PATCH] lib/database.cc: coding style

2009-11-21 Thread Chris Wilson
Carl claims he must have been distracted when he wrote this... Signed-off-by: Chris Wilson --- lib/database.cc | 18 +++--- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 207246c..0f95aa1 100644 --- a/lib/database.cc +++ b

[notmuch] [PATCH] notmuch-new: Only install SIGALRM if not running under gdb

2009-11-22 Thread Chris Wilson
we need to add a compile time check for the valgrind development library, and so add the initial support to build Makefile.config from configure. Signed-off-by: Chris Wilson Reviewed-by: Carl Worth --- Makefile.config |1 + Makefile.local |3 ++- configure| 21

[notmuch] [PATCH] notmuch-new: Only install SIGALRM if not running under gdb

2009-11-22 Thread Chris Wilson
we need to add a compile time check for the valgrind development library, and so add the initial support to build Makefile.config from configure. Signed-off-by: Chris Wilson Reviewed-by: Carl Worth [ickle: And do not install the timer] --- Makefile.config |1 + Makefile.local |3

[notmuch] Avoid installing SIGALRMs when under the debugger.

2009-11-22 Thread Chris Wilson
Gah, I'm tired and using "git send-email HEAD^" is too easy. Here is the most recent pair of patches in possibly a working state. -ickle

[notmuch] [PATCH 1/2] notmuch-new: Only install SIGALRM if not running under gdb

2009-11-22 Thread Chris Wilson
we need to add a compile time check for the valgrind development library, and so add the initial support to build Makefile.config from configure. Signed-off-by: Chris Wilson Reviewed-by: Carl Worth [ickle: And do not install the timer when under the debugger] --- Makefile.config |1

[notmuch] [PATCH 2/2] notmuch-new: Only print the regular progress report when on a tty

2009-11-22 Thread Chris Wilson
Check that the stdout is connected to an interactive terminal with isatty() before installing the periodic timer to print progress reports. Signed-off-by: Chris Wilson --- notmuch-new.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c

[notmuch] [PATCH] notmuch-new: Eliminate tallocs whilst construct filenames.

2009-11-22 Thread Chris Wilson
The majority of filenames will fit within PATH_MAX [4096] (because that's a hard limit imposed by the filesystems) so we can avoid an allocation per lookup and thereby eliminate a large proportion of the overhead of scanning a maildir. Signed-off-by: Chris Wilson --- notmuch-new.c | 75

[notmuch] [PATCH] notmuch-new: Remove the tiresome joke from the output.

2009-11-24 Thread Chris Wilson
As I see this every time I poll for new mail, the joke becomes very old very quickly. The other instances of "not much" are shown much less often and have a much more natural style, this one however feels forced, impairing the humorous effect. Signed-off-by: Chris "the critic" Wilson ---

[notmuch] [PATCH] notmuch-new: Check for non-fatal errors from stat()

2009-11-27 Thread Chris Wilson
-of-memory, we handle like the other fatal errors by jumping to the end. Signed-off-by: Chris Wilson --- notmuch-new.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 3cde3a7..71224c5 100644 --- a/notmuch-new.c +++ b

[notmuch] [PATCH] notmuch-new: Eliminate tallocs whilst construct filenames.

2009-11-27 Thread Chris Wilson
Excerpts from Carl Worth's message of Fri Nov 27 13:23:06 + 2009: > On Sun, 22 Nov 2009 00:57:10 +0000, Chris Wilson chris-wilson.co.uk> wrote: > > The majority of filenames will fit within PATH_MAX [4096] (because > > that's a hard limit imposed by the filesystem

[notmuch] semi-usable notmuch-gtk client

2009-12-07 Thread Chris Wilson
oning this, Aneesh. > > Hooking up Anjal to notmuch was an idea that Chris Wilson had almost > immediately after playing with notmuch. I think he even started poking > around in the Anjal code base to see how much work this would be. > > Chris, did you make any progress worth men

[notmuch] [PATCH] [RFC] notmuch search: Return a non-zero exitcode if the search returns no hits.

2010-01-15 Thread Chris Wilson
If the user is explicitly searching for a message, then if notmuch fails to find it, it is useful to set a failure exit code. This makes it easier for scripting. However, we will want to then distinguish between fatal errors (such as out-of-memory, invalid arguments, corrupt db, etc) from the

[PATCH] Makefile: specify libnotmuch.so location with -rpath

2010-04-25 Thread Chris Wilson
In order to handle installation into user directories, it is convenient to encode the library location into the search path for the notmuch executable. This is achieved for the GNU linker with the -rpath argument. --- Makefile.local |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[PATCH] Add a few tests for searching LWN emails.

2011-01-29 Thread Chris Wilson
like a pretty arbitrary differentiator (i.e. 'Q. ' > is fine, but 'LWN.net' isn't) The syntax is defined in http://www.faqs.org/rfcs/rfc2822.html in particular section 3.2.4. From that it appears the unquoted use of [a-Z][.a-Z]* is valid. However, I shall leave the intricacies to those whose understand and appreciate the whole problem... -Chris -- Chris Wilson, Intel Open Source Technology Centre