From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id TziFHP7H4WDePAEAgWs5BA (envelope-from ) for ; Sun, 04 Jul 2021 16:38:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aBTLF/7H4WCqfQAAbx9fmQ (envelope-from ) for ; Sun, 04 Jul 2021 14:38:54 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8ED3E28D29 for ; Sun, 4 Jul 2021 16:38:53 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7FEFA29081; Sun, 4 Jul 2021 10:38:49 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 9FF552905E for ; Sun, 4 Jul 2021 10:38:46 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 7AD935FD21; Sun, 4 Jul 2021 10:38:46 -0400 (EDT) Received: (nullmailer pid 3432167 invoked by uid 1000); Sun, 04 Jul 2021 14:38:45 -0000 From: David Bremner To: Hannu Hartikainen , notmuch@notmuchmail.org Subject: Re: [PATCH] cli/show: add --format=pretty In-Reply-To: <20210619203838.275767-1-hannu@hrtk.in> References: <20210619203838.275767-1-hannu@hrtk.in> Date: Sun, 04 Jul 2021 11:38:45 -0300 Message-ID: <87lf6m6t56.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: WS4BW57BJ6KIHYWNJ6PE3QNPXXKR66A5 X-Message-ID-Hash: WS4BW57BJ6KIHYWNJ6PE3QNPXXKR66A5 X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625409534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lnoQh0GZTs8HrnAsLRgArQ4ewPHZ3hVjlZp97QdrYSU=; b=GS89leGIevIteW4Xb+BA5hqxA3IOq8/hPaV2wI0DXtWTeB0yhUdt2tkUneqWIisDOL8mlX uDt1AI9AlA4y7hGBOONGHDVAnV5VV6CHd2D9nuoGYbqt0y87gODBIbars8YdWkel6MaGq9 9JdMor57cIK/d45k96RJxRHN7S4TuQ5JeXZyZ4tIL0FYa7sU7eWo2yQihfgXeerMau4h8N MWfjpJIIcmPkTe3Wq7P+XC2zJAI5f/47zzQfeyJohT0euOLv7eiVz9+U9yXgCrZD+0uGOE hGcCU8BGiAznO4QvAYpdbk43W87FVY+gBmQ4CkNoiyXVE051013IBs/W9u9GSg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625409534; a=rsa-sha256; cv=none; b=tB7PTDdejca4S0QyLeFeaEPPK28x1KZ4oArCIoULSqzBQ4QRYOCW4xxyszypR75I0/apLI F0Ynz02bp/bcq7dBwMh6pLkrMlsv6RviiMhZxNnYudvYoBS71gLMmEB8lXn1nLqujKUyGC YUdNjYXJUuKlKzgHwIYqDJ2BeXW+XLptsgszz9mjSKuWAtBY0aZTXVanHkuktb5P3X/a7t AExNKToFd6aTI44WDr6uFzR7Ej9e1ams6T5Z9tYsCuJWNON+u0nyY1bPnGnApUHJ+YlsFL qGNVlhyF7KJvZ5CmTOkeYIbThRSiGhwGfm3v03oWcEYoXmtlxTtHuAoQ0mxQeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 8ED3E28D29 X-Spam-Score: -2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: e30HAdN0WJ8X Hannu Hartikainen 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