* 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:
@ -76,6 +76,23 @@ gchar* mu_util_guess_mu_homedir (void);
|
||||
gchar* mu_util_guess_xapian_dir (const gchar *muhome);
|
||||
|
||||
|
||||
/**
|
||||
* guess the place of the bookmark file (typically,
|
||||
* ~/.mu/bookmarks). Note that this does not mean the file actually
|
||||
* exists.
|
||||
*
|
||||
* @param muhome the mu home directory or NULL, in which the muhome
|
||||
* directoy will be guessed as well
|
||||
*
|
||||
* @return the guessed mu bookmark file, which needs to be freed with
|
||||
* g_free when no longer needed.
|
||||
*/
|
||||
gchar* mu_util_guess_bookmark_file (const gchar *muhome);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* if path exists, check that's a read/writeable dir; otherwise try to
|
||||
* create it (with perms 0700)
|
||||
@ -157,6 +174,9 @@ gchar* mu_util_str_from_strv (const gchar **params) G_GNUC_WARN_UNUSED_RESULT;
|
||||
#define MU_XAPIAN_DIR_NAME "xapian"
|
||||
#define MU_XAPIAN_VERSION_KEY "db_version"
|
||||
|
||||
/* name of the bookmark file */
|
||||
#define MU_BOOKMARK_FILENAME "bookmarks"
|
||||
|
||||
/**
|
||||
* log something in the log file; note, we use G_LOG_LEVEL_INFO
|
||||
* for such messages
|
||||
|
||||
Reference in New Issue
Block a user