* add basic implementation for bookmark support.

basically, add a file named ~/.mu/bookmarks which looks something like
  ----
  [mu]
  testarch=subject:test maildir:/archive
  inbox=maildir:/inbox
  ----

  now, one can do a query, e.g.

    mu find -b testarch

  which is equivalend to

    mu find subject:test maildir:/archive

 if both a bookmark and a 'normal' search expression are specified,
 the will be concatenated.

 bookmarks starting with mu_ are reserved for mu itself.
This commit is contained in:
Dirk-Jan C. Binnema
2010-11-13 14:16:38 +02:00
parent be9157f3e9
commit 3794182e05
6 changed files with 124 additions and 51 deletions

View File

@ -36,7 +36,7 @@ struct _MuConfigOptions {
gboolean quiet; /* don't give any output */
gboolean debug; /* spew out debug info */
char *muhome; /* the House of Mu */
char *xpath; /* path to the Xapian dir */
char *xpath; /* path to the Xapian dir (internal) */
gboolean version; /* request mu version */
gboolean log_stderr; /* log to stderr (not logfile) */
gchar** params; /* parameters (for querying) */
@ -54,7 +54,9 @@ struct _MuConfigOptions {
char *fields; /* fields to show in output */
char *sortfield; /* field to sort by (string) */
gboolean descending; /* sort descending? */
unsigned summary_len; /* max # of lines of msg in summary */
unsigned summary_len; /* max # of lines of msg in summary */
char *bookmark; /* use bookmark */
char *bmpath; /* path to bookmark file (internal) */
/* output to a maildir with symlinks */
char *linksdir; /* maildir to output symlinks */
gboolean clearlinks; /* clear a linksdir before filling */