From 74ed3e7bbf724244cfb7ba003533e835cad94b92 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 13 Jul 2012 20:50:29 +0100 Subject: [PATCH] Re: [PATCH 2/3] cli: show allow the caller to specify the headers output. --- b5/ed3dc44da05bd820b366eebeeb7510a6e459c1 | 117 ++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 b5/ed3dc44da05bd820b366eebeeb7510a6e459c1 diff --git a/b5/ed3dc44da05bd820b366eebeeb7510a6e459c1 b/b5/ed3dc44da05bd820b366eebeeb7510a6e459c1 new file mode 100644 index 000000000..aba445e6f --- /dev/null +++ b/b5/ed3dc44da05bd820b366eebeeb7510a6e459c1 @@ -0,0 +1,117 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id EB7AC431FB6 + for ; Fri, 13 Jul 2012 12:50:33 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id durZt9u9E5bX for ; + Fri, 13 Jul 2012 12:50:33 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 41D70431FAE + for ; Fri, 13 Jul 2012 12:50:33 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1Splsl-0005rv-EW; Fri, 13 Jul 2012 20:50:31 +0100 +Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] + helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) + (envelope-from ) + id 1Splsl-0003T5-3U; Fri, 13 Jul 2012 20:50:31 +0100 +From: Mark Walters +To: Jameson Graef Rollins , + notmuch@notmuchmail.org +Subject: Re: [PATCH 2/3] cli: show allow the caller to specify the headers + output. +In-Reply-To: <878venxxpe.fsf@servo.finestructure.net> +References: <1341673978-6094-1-git-send-email-markwalters1009@gmail.com> + <1341673978-6094-3-git-send-email-markwalters1009@gmail.com> + <878venxxpe.fsf@servo.finestructure.net> +User-Agent: Notmuch/0.13.2+63~g1397edd (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Fri, 13 Jul 2012 20:50:29 +0100 +Message-ID: <87bojjcuey.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 94.192.233.223 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: a26aac64dfb4d61078fa9ac4796b442e (of first 20000 bytes) +X-SpamAssassin-Score: -1.8 +X-SpamAssassin-SpamBar: - +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -1.8 points. + Summary of the scoring: + * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, + * medium trust + * [138.37.6.40 listed in list.dnswl.org] + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay + * domain + * 0.5 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 13 Jul 2012 19:50:34 -0000 + +On Fri, 13 Jul 2012, Jameson Graef Rollins wrote: +> On Sat, Jul 07 2012, Mark Walters wrote: +>> +typedef enum { +>> + NOTMUCH_SHOW_OUTPUT_HDR_DATE = 0x1, +>> + NOTMUCH_SHOW_OUTPUT_HDR_SUBJECT = 0x2, +>> + NOTMUCH_SHOW_OUTPUT_HDR_FROM = 0x4, +>> + NOTMUCH_SHOW_OUTPUT_HDR_TO = 0x8, +>> + NOTMUCH_SHOW_OUTPUT_HDR_CC = 0x10, +>> + NOTMUCH_SHOW_OUTPUT_HDR_REPLY_TO = 0x20, +>> + NOTMUCH_SHOW_OUTPUT_HDR_IN_REPLY_TO = 0x40, +>> + NOTMUCH_SHOW_OUTPUT_HDR_REFERENCES = 0x80, +>> + NOTMUCH_SHOW_OUTPUT_DEFAULT = +>> + NOTMUCH_SHOW_OUTPUT_HDR_SUBJECT | +>> + NOTMUCH_SHOW_OUTPUT_HDR_FROM | +>> + NOTMUCH_SHOW_OUTPUT_HDR_TO | +>> + NOTMUCH_SHOW_OUTPUT_HDR_CC | +>> + NOTMUCH_SHOW_OUTPUT_HDR_DATE +>> +} notmuch_show_output_t; +> +> Is there a reason we need to limit this to some pre-defined subset of +> headers? Wouldn't it be nice if you could just specify arbitrary +> headers? + +I basically agree but it looked like it would be relatively ugly to pass +around. + +However, perhaps this is all being too general: the caller probably +cares that all the headers it wants are output and perhaps not too many +others (eg over ssh or to android etc). Would something more like +headers=brief or headers=full be enough? And we would still want an +option allowing the body to be omitted. + +What do you think? + +Best wishes + +Mark + -- 2.26.2