[PATCH] Have --format=mbox insert Status:
Michal Sojka
sojkam1 at fel.cvut.cz
Sat Feb 5 15:08:54 PST 2011
On Wed, 02 Feb 2011, Peter John Hartman wrote:
> Hi folks,
>
> This is not a complete patch, but should give you an idea. (It works well
> enough for me, but I think it could do more).
>
> diff --git a/notmuch-show.c b/notmuch-show.c
> index ef421ec..dff66de 100644
> --- a/notmuch-show.c
> +++ b/notmuch-show.c
> @@ -272,6 +272,12 @@ format_message_mbox (const void *ctx,
>
> printf ("From %s %s", from, date_asctime);
>
> + if (strstr(_get_tags_as_string(ctx,message),"unread") != NULL) {
> + printf ("Status: O\n");
> + } else {
> + printf ("Status: RO\n");
> + }
> +
Hi Peter,
would this output be compatible with all mbox consumers or only with
those who expect the Status: line? If the latter, we would probably want
a command line option to enable this.
> For instance, I combine notmuch with mutt as follows:
>
> notmuch show --format=mbox $(notmuch search thread:xxx | cut -d' ' -f1) >
> tmp.mbox && mutt -f tmp.mbox && rm -f tmp.mbox
Interesting :)
-Michal
More information about the notmuch
mailing list