unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Hannu Hartikainen <hannu@hrtk.in>, notmuch@notmuchmail.org
Subject: Re: [PATCH] cli/show: add --format=pretty
Date: Sun, 04 Jul 2021 11:38:45 -0300	[thread overview]
Message-ID: <87lf6m6t56.fsf@tethera.net> (raw)
In-Reply-To: <20210619203838.275767-1-hannu@hrtk.in>

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


  parent reply	other threads:[~2021-07-04 14:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19 20:38 [PATCH] cli/show: add --format=pretty Hannu Hartikainen
2021-06-22 12:34 ` [PATCH] cli/show: add --color/--no-color Hannu Hartikainen
2021-07-12  8:38   ` Yet another revision of --format=pretty Hannu Hartikainen
2021-07-12  8:38     ` [PATCH v3 1/2] cli/show: add --format=pretty Hannu Hartikainen
2021-07-12 23:40       ` David Bremner
2021-07-13 10:24         ` David Bremner
2021-07-13 11:50           ` Hannu Hartikainen
2021-07-12  8:38     ` [PATCH v3 2/2] cli/show: add color for --format=pretty Hannu Hartikainen
2021-07-12 23:19     ` Yet another revision of --format=pretty David Bremner
2021-07-13 12:07       ` Hannu Hartikainen
2021-07-02 20:31 ` [PATCH v2] cli/show: add --format=pretty Hannu Hartikainen
2021-07-04  9:40   ` Tomi Ollila
2021-07-04 11:54     ` Hannu Hartikainen
2021-07-04 14:38 ` David Bremner [this message]
2021-07-05 13:31   ` [PATCH] " Hannu Hartikainen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf6m6t56.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=hannu@hrtk.in \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).