From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YJtEJKcJ42AyfwAAgWs5BA (envelope-from ) for ; Mon, 05 Jul 2021 15:31:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8BYGIKcJ42AlKQAAB5/wlQ (envelope-from ) for ; Mon, 05 Jul 2021 13:31:19 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 428B4FC59 for ; Mon, 5 Jul 2021 15:31:19 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C023229083; Mon, 5 Jul 2021 09:31:14 -0400 (EDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by mail.notmuchmail.org (Postfix) with ESMTPS id D01ED2904B for ; Mon, 5 Jul 2021 09:31:11 -0400 (EDT) Received: by mail-lf1-f42.google.com with SMTP id t17so32612921lfq.0 for ; Mon, 05 Jul 2021 06:31:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:subject:to:in-reply-to :references; bh=0P/IGVEUVmSUtQAfDMf31JNV5P045jfKQi3A1DMwAtY=; b=WTd2w3tUTEVvcmCVBzFXDsY3u89MnXVU31KlcfYq24ZNn0RbjuHNgfHyuwLH9O4tu+ kuByzD/26jR0MUWon+PVDC2lzLMHXTFFAXxAgN08HFbrVKGJ2IW5+cDl4CRp7PEKcg6J X6aUJdFBk9YbmHnQCekN3l84jK4Cdi8Z4irl3qxd9wQi42aytpGogpRG5yLFKU/YZtRi MLvFfLreVH+2LO+VJuhSfwJRxRHGnBYF6CUN8hpKUZeJjkzzKD8zSaeAxrUcDZSv5L1r Pj5skuaeRr8+hUJq2bUn/WMl2IuT9i9YuMWYSGdF0+3ZUm05/OxdgJNaDZZx1PuTbqPY 3yJQ== X-Gm-Message-State: AOAM533ieZHrisM6RwCq5gwRU4XdQfAgMbpQExuHWJzNCdylFglYwao3 DIcORuAgB8k3EhtoDHO+q7uVwH1b5O8Kxw== X-Google-Smtp-Source: ABdhPJwNaklx6D/rO/Mzq+tU1sPxoUZlQxJQpkYVZBr1pIc63iSswiLvmWJExvGlk088kduMgjkzQQ== X-Received: by 2002:a19:f807:: with SMTP id a7mr10834872lff.149.1625491870381; Mon, 05 Jul 2021 06:31:10 -0700 (PDT) Received: from localhost (88-112-11-80.elisa-laajakaista.fi. [88.112.11.80]) by smtp.gmail.com with ESMTPSA id s21sm1082757lfc.249.2021.07.05.06.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 06:31:09 -0700 (PDT) Message-ID: <60e3099d.1c69fb81.75191.5f67@mx.google.com> Date: Mon, 05 Jul 2021 16:31:08 +0300 From: Hannu Hartikainen Subject: Re: [PATCH] cli/show: add --format=pretty To: David Bremner , notmuch@notmuchmail.org In-Reply-To: <87lf6m6t56.fsf@tethera.net> References: <20210619203838.275767-1-hannu@hrtk.in> <87lf6m6t56.fsf@tethera.net> Message-ID-Hash: V2HBDYPHXJMZ7IYXZMZCVLWUAUA47WQI X-Message-ID-Hash: V2HBDYPHXJMZ7IYXZMZCVLWUAUA47WQI X-MailFrom: hannu.hartikainen@gmail.com 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: MIME-Version: 1.0 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=1625491879; 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=lRsTl+/oPYtMNO7SBBD768FC021VSXN6Ya6pnNh70to=; b=V8WNiGAi1MKtfzb6y7X0wQM/KkvcV332Z1c9OVt0xBYp71zneRe+SnJuFtnJa0il3aMYWa 4EfoKOa1P6mkhXNwv1LL4eY7rlwwq3M2DJjCkLdIKaP8SQvuB2bF5NIBzZF+QsPI0RScFo RMilIZ26NkcmWSW0oTmNl3HHixn3kN7RPe0NcCHfM2jlvKT8uZJTZ6eZW+TumRfVbfkve/ Urzd8c14CQHeUFctVeIKf5jCDh1dGD5R9SCAsXvnGk9At5tphFrdYSxkQRcCXH3jtNTgD2 UJFIOVZJq0dZHxkbfjNiBTIebzx+o4n5b/IIMnUE8uhWqu8lWQYpTEGHRd4A7g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625491879; a=rsa-sha256; cv=none; b=kyXZuhFjuivM2k4vOfAsAv2CHQtSek1z5ICmq5hvu4zq7GWJZwpiPVEh27FLqo8BOloT5V MCg6Qd/aS51BBOKD8iAefaSQWOswBTh0wIeL17meQlpe60QN4fn55ehUfJNtmPgyxO3Riu gyAu4dL4QoKaxuHlVRxtkfYbWnSPEnDwaJFfVcPkWM6qSV2xyG9XW4fmHdfPElWnqijvBQ vhPJ4Dc1UNNEo1SDMAPKIyVCKzGKz72R7bD+Q7E/Vr1U+s8Dk/NVpT6HDY+P4Tv7ys59Lw qGIsgMcaQw7nmkHLp5t521OY2vXCIOQd3LbviIp3QQXsKHu+R8rUBj99GPBDCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 428B4FC59 X-Spam-Score: -2.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: dTGgYV8dns6c Hi! Thanks for starting discussion on the matter. Do feel free to tell me if I have the completely wrong idea about project goals. On Sun, 04 Jul 2021 11:38:45 -0300, David Bremner wrote: > 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. I can appreciate that. I've maintained open source software before and I know people come up with the weirdest feature requests that simply don't fit the scenario I'm building the software for. If this text format that I personally like to use isn't good for the project, it definitely should not be merged. What do you see as the mission statement for notmuch-cli? I'd like to make it ergonomic enough to be usable without a MUA, and it's really close already. But if notmuch-cli is meant to be something completely different I might just have my own set of patches or consider starting my own project. > 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. I'm pretty sure you can embed ANSI escapes in email and they'll be displayed by `notmuch show` as color in a typical terminal. Not sure if anyone should be worried about attacks specifically against notmuch users, though. > 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? --format=pretty is not any better than --format=raw for use with git-am but the point is that it's as good. I have the shell alias ns="notmuch show --format=pretty" and I can use something like `ns tag:unread` for reading and `ns id:some-id | git am` for applying patches. I personally really, really like simple things that work for multiple purposes. For human consumption the pretty format is nicer than the raw format, and it also supports showing multiple messages. Hannu