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 ms11 with LMTPS id EMxFJF3MBWDsUwAA0tVLHw (envelope-from ) for ; Mon, 18 Jan 2021 17:58:53 +0000 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 +K8PIF3MBWDrOwAAB5/wlQ (envelope-from ) for ; Mon, 18 Jan 2021 17:58:53 +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) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 903099404CC for ; Mon, 18 Jan 2021 17:58:52 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B58E229DE5; Mon, 18 Jan 2021 12:58:46 -0500 (EST) Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by mail.notmuchmail.org (Postfix) with ESMTPS id 5B2661FF9D for ; Mon, 18 Jan 2021 12:58:43 -0500 (EST) Received: by mail-wm1-x32e.google.com with SMTP id y187so14549145wmd.3 for ; Mon, 18 Jan 2021 09:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:subject:in-reply-to:references:from:date:message-id:mime-version; bh=UPS39TGxKnlE+u1+6P1M7bin92PzgorrSGWdW64QbI4=; b=cLe/y0tcIZAn+ad9p73iEH1G06B9zPpaNFu9vZZbTInojzTy9xP45/mBrZbibK49ZF LTflnEZSrhbGK0gYMSwee9PoPr3bwC0IfJQJpwsghKj9c8kxlbZZEqpEyRHydO0YNqbm y1vMi7SwkEAVrPe9HzgDXSetG3Z50sEugAG/v3IKp8JE0Dgav7cxZZfMO4IKtm383KY2 1dWBuDYOH+JSM7fetKHMB6jbIiKI84AJVCF3SSWBq1suFTz9vN7p1drmmaHrQmRVP1JK IUVGi91kxSK8Ksi0SykfA79oOujXIZ9xn6/LsqeZDdloMcpL86rfvayhGYVkIwKxo0W/ 1vgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:in-reply-to:references:from:date :message-id:mime-version; bh=UPS39TGxKnlE+u1+6P1M7bin92PzgorrSGWdW64QbI4=; b=eUMYJFezzys9YQFkC3atfAK18QLEjJG8kkGxIIvvxJepowEkHf19dKwtz8tpg36W+i UfBPXSgOpC3JBrE6FbFus6FO+dWZfkjDlPsljC6FEHqIJHblUFCnQi/kk6Eut8Cv6gfG Wuc5wvauf5Ep6RPtUayFeRKbqhUDH3qrLJ5s8whC5jZp7t/6iEo7VyeCz7GMdCETuMsg fJX7Qf/MzIhX2rIryuS38Lm4kntKGibYAV9t1EiFvOKRs+lWDVvgVWSiIWFGLTy9Pzpj KsDolg4ROkPAOo0jZxH/fMqBpIHVE7KxD4YgG6VStGodq0jnhNLKncHeEVtY0Nx2gEG3 uVow== X-Gm-Message-State: AOAM533WIN1K5L6xQcHbff9elypSgF1rGzMx+rso0E8aoWeucOcDbTDU Zz/QSWcU3CIjbFE0VAfodaZ1+w== X-Google-Smtp-Source: ABdhPJwfqLxu4q8yQBB9qKqb3e+Z5nhhnb2fPizlMyAWurhRrthGh+8sEnOhDBLwrcM8IiFWZUlcDg== X-Received: by 2002:a1c:4487:: with SMTP id r129mr484638wma.57.1610992721544; Mon, 18 Jan 2021 09:58:41 -0800 (PST) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [2001:8b0:bb71:7140:64::1]) by smtp.gmail.com with ESMTPSA id g12sm149383wmh.14.2021.01.18.09.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 09:58:41 -0800 (PST) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 944c56d3; Mon, 18 Jan 2021 17:58:40 +0000 (UTC) To: David Bremner , notmuch@notmuchmail.org Subject: Re: [RFC PATCH] show: Add support for -format=raw -body=false In-Reply-To: <87mtx6gn97.fsf@tethera.net> References: <20210117183710.29850-1-dme@dme.org> <87mtx6gn97.fsf@tethera.net> X-HGTTG: zarquon From: David Edmondson X-Now-Playing: Elbow - The Seldom Seen Kid: Mirrorball Date: Mon, 18 Jan 2021 17:58:40 +0000 Message-ID: MIME-Version: 1.0 Message-ID-Hash: O6LPURP6OQSODAMPGCMRTQTI5NWIJL4C X-Message-ID-Hash: O6LPURP6OQSODAMPGCMRTQTI5NWIJL4C X-MailFrom: dme@dme.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 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 X-Migadu-Spam-Score: -1.10 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=dme-org.20150623.gappssmtp.com header.s=20150623 header.b="cLe/y0tc"; 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: 903099404CC X-Spam-Score: -1.10 X-Migadu-Scanner: scn1.migadu.com X-TUID: kH3mUA5YzsiO On Monday, 2021-01-18 at 13:37:08 -04, David Bremner wrote: > David Edmondson writes: > >> Similar to other formats, allow the body to be omitted when outputting >> raw messages. >> >> This can be used by UI code to get the full headers of a message >> without the need to consume the body, which may be large. > > I guess I'm a bit confused why this is for "raw" format, and not > "text". Are you proposing that we have two ad-hoc output formats for > consuming by scripts and other tools that don't want JSON or SEXP? "text" is a strange archaic output format, the rationale for which seems lost in time :-) "notmuch show --format=text --body=false id:foo" already works, but doesn't provide a complete set of headers - it's limited to subject, from, to, date, *cc, ... I wanted to get the Autocrypt or Face headers, so ended up using "--format=raw", but then end up with the entire message, which can be megabytes large. With the emacs UI, that means pulling all of that data into a buffer, just to ignore it. Now, it would be nice to be able to say something like... notmuch show --format=sexp --body=false \ --headers=received-by,face,x-face \ id:foo ...to get some extra headers in the sexp output, but I didn't look at it yet. The proposed change seems like a simple, obvious improvement that is entirely in-line with the existing interface and implementation. Is there any reason not to do it? dme. -- Don't you know you're never going to get to France.