diff --git a/src/mu-config.c b/src/mu-config.c index c512927c..41f64182 100644 --- a/src/mu-config.c +++ b/src/mu-config.c @@ -172,7 +172,9 @@ set_group_find_defaults (MuConfig *opts) if (!opts->sortfield) { opts->sortfield = "d"; opts->descending = TRUE; - } + } else + opts->descending = FALSE; + } if (!opts->formatstr) /* by default, use plain output */ diff --git a/src/mu-config.h b/src/mu-config.h index 063f4ee3..9c72f001 100644 --- a/src/mu-config.h +++ b/src/mu-config.h @@ -108,7 +108,7 @@ struct _MuConfig { /* options for querying 'find' (and view-> 'summary') */ char *fields; /* fields to show in output */ char *sortfield; /* field to sort by (string) */ - gboolean descending; /* sort descending? */ + gboolean descending; /* sort descending (z->a)? */ gboolean threads; /* show message threads */ gboolean summary; /* include a summary? */ char *bookmark; /* use bookmark */ diff --git a/src/mu-msg-flags.h b/src/mu-msg-flags.h index cbe9614a..73a736c8 100644 --- a/src/mu-msg-flags.h +++ b/src/mu-msg-flags.h @@ -60,7 +60,6 @@ enum _MuMsgFlags { * means (NEW or not SEEN) */ MU_MSG_FLAG_UNREAD = 1 << 7, - /* these we get from the contents */ /* "Z"->signed message */ diff --git a/src/mu-msg.c b/src/mu-msg.c index 25b80db4..cc1e273c 100644 --- a/src/mu-msg.c +++ b/src/mu-msg.c @@ -813,3 +813,5 @@ error: return FALSE; } + + diff --git a/src/mu-msg.h b/src/mu-msg.h index d3d55b14..2a8ac4f5 100644 --- a/src/mu-msg.h +++ b/src/mu-msg.h @@ -358,6 +358,21 @@ int mu_msg_cmp (MuMsg *m1, MuMsg *m2, MuMsgFieldId mfid); +/** + * convert the msg to a Lisp symbolic expression (for further processing in + * e.g. emacs) + * + * @param msg a valid message + * @param dbonly if TRUE, only include message fields which can be + * obtained from the database (this is much faster if the MuMsg is + * database-backed, so no file needs to be opened) + * + * @return a string with the sexp (free with g_free) or NULL in case of error + */ +char* mu_msg_to_sexp (MuMsg *msg, gboolean dbonly); + + + /** * move a message to another maildir; the function returns the full * path to the new message, and changes the msg to now point to the @@ -463,7 +478,8 @@ typedef gboolean (*MuMsgContactForeachFunc) (MuMsgContact* contact, gpointer user_data); /** - * call a function for each of the contacts in a message + * call a function for each of the contacts in a message; the order is: + * from to cc bcc (of each there are zero or more) * * @param msg a valid MuMsgGMime* instance * @param func a callback function to call for each contact; when