[notmuch] Notmuch's search view sucks

2009-12-04 Thread Karl Wiberg
On Fri, Dec 4, 2009 at 1:29 AM, Carl Worth  wrote:
> And a step beyond that would support different languages for
> different emails, but that sounds like something "hard" to identify.

But probably not as hard as identifying spam. It could probably be
done with a simple Bayesian filter counting word frequencies---but
it'd be much better if somebody else had already solved the problem,
since this smells suspiciously like something that ought to be a
separate project and put in a library ... does anyone know if such a
project already exists? I know Google can do it ...

It'd be very cool to have notmuch automatically tag messages according
to what language they're in.

-- 
Karl Wiberg, kha at treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle


[notmuch] [PATCH] Makefile: Enable backslash escapes for echo.

2009-11-26 Thread Karl Wiberg
On Thu, Nov 26, 2009 at 12:05 PM, Jan Janak  wrote:

> I sent exactly the same patch a couple of days ago and it was
> rejected because it does not work everywhere, see:
>
> http://notmuchmail.org/pipermail/notmuch/2009/000370.html

And as I said in that thread, I believe you should use printf instead.
(http://www.in-ulm.de/~mascheck/various/echo+printf/ seems like a good
reference in this matter.)

-- 
Karl Wiberg, kha at treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle


[notmuch] [PATCH 4/4] notmuch-new: New cmdline option --tag=.

2009-11-25 Thread Karl Wiberg
On Tue, Nov 24, 2009 at 11:10 PM, Jan Janak  wrote:
> The list of tags to be applied by 'notmuch new' can be configured in
> the configuration file. This command line option can be used to
> override the list of tags from the coonfiguration file on the command
> line. You may repeat the option several times if you want to apply
> more than one tag:
>
> ?notmuch new --tag=apple --tag=orange

This leaves no way to skip the tags in the config file without adding
at least one tag on the command line, right? It might be more flexible
to e.g. have the commandline tags applied in _addition_ to the tags in
the config, and have a --no-config-tags flag to skip the tags in the
config when desired. Or, if that seems more convenient, have a
--config-tags=yes|no flag that defaults to yes when no --tag is given,
and to no when at least one --tag is given.

-- 
Karl Wiberg, kha at treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle


[notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values

2009-11-23 Thread Karl Wiberg
On Mon, Nov 23, 2009 at 12:11 PM, Dirk-Jan Binnema  
wrote:

> On Mon, Nov 23, 2009 at 9:34 AM, Karl Wiberg  wrote:
>
> > Didn't the "(void)" suggestion work?
>
> I actually preferred that solution, but unfortunately, it didn't
> stop gcc from complaining...

Hmpf. I'd argue that that's a gcc bug, forcing the user to use an
unnecessarily complicated way to pretend to use the return value. Oh
well.

-- 
Karl Wiberg, kha at treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle


[notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due to ignored write return values

2009-11-23 Thread Karl Wiberg
On Mon, Nov 23, 2009 at 7:20 AM, Dirk-Jan C. Binnema
 wrote:

> + ? ?ssize_t ignored;
> ? ? static char msg[] = "Stopping... ? ? ? ? \n";
> - ? ?write(2, msg, sizeof(msg)-1);
> +
> + ? ?ignored = write(2, msg, sizeof(msg)-1);
> ? ? interrupted = 1;
> ?}

Didn't the "(void)" suggestion work?

-- 
Karl Wiberg, kha at treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle


[notmuch] [PATCH] makefile: Tell echo to interpret escape sequences.

2009-11-23 Thread Karl Wiberg
On Mon, Nov 23, 2009 at 3:41 AM, Carl Worth  wrote:

> It's a shame that simple things like "echo" aren't easy to use portably.
> (And yes, I know that autoconf has a bunch of tests for echo, such as
> how to get the behavior of "echo -n", etc.)

I think the standard workaround is to use "printf" instead.

-- 
Karl Wiberg, kha at treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle


[notmuch] Asynchronous tagging

2009-11-21 Thread Karl Wiberg
On Sat, Nov 21, 2009 at 9:01 PM, Carl Worth  wrote:

> Does offlineimap use tmp while it's delivering message and then move
> things to new? If so, then maybe all we need to do to fix notmuch to not
> look into tmp directories?

That's probably the right thing to do regardless---IIRC, the tmp
directory exists so that processes can put messages there while they
are writing them, and then do an atomic rename to the new (or cur)
directory.

-- 
Karl Wiberg, kha at treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle


[notmuch] [PATCH 2/2] .gitignore: Add common editor droppings

2009-11-19 Thread Karl Wiberg
On Wed, Nov 18, 2009 at 11:51 PM, Ingmar Vanhassel  
wrote:

> diff --git a/.gitignore b/.gitignore
> index d277c5a..a210779 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -2,4 +2,6 @@
> ?notmuch
> ?notmuch.1.gz
> ?*.[ao]
> +*~
> +.*.swp

Since these patterns are specific to a user rather than a project,
shouldn't they go in the user's ignore file (~/.gitignore) rather than
the project's?

-- 
Karl Wiberg, kha at treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle