Re: [PATCH] cli/show: add --format=pretty

Subject:Re: [PATCH] cli/show: add --format=pretty

Date:Sun, 04 Jul 2021 11:38:45 -0300

To:Hannu Hartikainen ,notmuch@notmuchmail.org

Cc:

From:David Bremner


Hannu Hartikainen <hannu@hrtk.in> writes:

> The rationale for this feature is twofold:
>
> 1. It is useful to be able to view messages in as human-friendly format
>    as possible.
> 2. The same format should still be machine-readable, too.

This is not really directed at Hannu, but at the notmuch community. As
you can imagine I'm not super enthusiastic an every growing number of
output formats to maintain.

The usual argument for keeping --format=text is that it useful for
scripting. There is also the vim UI, but afaict that is no longer using
--format=text.  It would be nice if a new text like format could
(eventually) replace the old one. So what would the new format need to
do so that we could at least deprecate the old one?

One thing the old format did not do, but a generically useful on the
command-line format probably should is deal with signature verification
and decryption. There is obviously potential for visual spoofing, but
maybe color can help.

>
> While human readability is the main goal, another design goal was that
> piping the output to `git am` works, at least for individual messages
> sent with `git send-email`.
> ---

In my experience, notmuch show --format=raw works pretty well
for this. There was an issue with encoded line endings but that is fixed
in git 2.32. What advantage does this new format bring for patches?

d


_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: