(mu:for-each-message ...) allows an optional expression to be passed
so that only messages matching that expression are searched when
looking for duplicates.
This patch adds a --expr flag so that e.g.
find-dups.scm --expr d:6m..3m
will reduce the range of messages to those between 3 and 6 months ago
to search for duplicates. I found this useful when using expressions
to find messages in a particular year, rather than searching the whole
database. This is often quicker and less worrying than searching the
whole database.
If --expr is not provided, expr should default to #t so that the whole
database is searched as before.
'find-dups' was trying to call `mu remove' for each duplicate message it
removes. This can be quit slow, so simply delete a file. After dups have
been removed, run `mu index'.
Closes#592
Uses open-pipe* to ensure that escaping isn't needed (seen in md5sum)
since arguments are passed.
Also see this discussion: http://thread.gmane.org/gmane.lisp.guile.user/11777
Experimental feature... be careful.
mu:run-stats expects the passed-in function to take 3 arguments. The
third argument applies to gnuplot only, which is not applicable to the
count function in msgs-count.scm.