From dbce3b25571c2e8614b5a914f6d52fcccdd9480b Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sun, 9 Feb 2014 10:10:08 +0000 Subject: [PATCH] Re: [PATCH 2/2] emacs: Prefer Content-Description over filename for part buttons --- 00/be70ec0182189fa700ac97c4282a6f8217ad89 | 146 ++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 00/be70ec0182189fa700ac97c4282a6f8217ad89 diff --git a/00/be70ec0182189fa700ac97c4282a6f8217ad89 b/00/be70ec0182189fa700ac97c4282a6f8217ad89 new file mode 100644 index 000000000..601b48d59 --- /dev/null +++ b/00/be70ec0182189fa700ac97c4282a6f8217ad89 @@ -0,0 +1,146 @@ +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 20585431FBD + for ; Sun, 9 Feb 2014 02:10:25 -0800 (PST) +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 g3d0B3jIDnUN for ; + Sun, 9 Feb 2014 02:10:17 -0800 (PST) +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 0C894431FBC + for ; Sun, 9 Feb 2014 02:10:17 -0800 (PST) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1WCRKz-0001ZW-JG; Sun, 09 Feb 2014 10:10:10 +0000 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1WCRKz-0006sv-6w; Sun, 09 Feb 2014 10:10:09 +0000 +From: Mark Walters +To: "W. Trevor King" , David Bremner +Subject: Re: [PATCH 2/2] emacs: Prefer Content-Description over filename for + part buttons +In-Reply-To: <20140208165931.GB17142@odin.tremily.us> +References: <877g9chbay.fsf@qmul.ac.uk> + + <27be295875a7df782a83c9a2c09d06f9d321fe9e.1391423201.git.wking@tremily.us> + <87vbwwosuw.fsf@qmul.ac.uk> <20140203203418.GO14197@odin.tremily.us> + <20140204013246.GQ19935@odin.tremily.us> <87r47dojbt.fsf@zancas.localnet> + <20140208165931.GB17142@odin.tremily.us> +User-Agent: Notmuch/0.15.2+484~gfb59956 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Sun, 09 Feb 2014 10:10:08 +0000 +Message-ID: <878utkd2bj.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-Sender-Host-Address: 93.97.24.31 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 8a1577782296a5f47bc4a84eb2b8c988 (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +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 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.0 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: notmuch@notmuchmail.org +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: Sun, 09 Feb 2014 10:10:25 -0000 + + +Initially I agreed with Bremner that we should be as faithful as +possible in our json/sexp output. However, looking at other headers like +cc: it seems that this can be present but empty (at least I sent myself +a message with that property), but that notmuch-show omits it. + +Looking at the code for that pathway we use +g_mime_message_get_recipients followed by +internet_address_list_to_string and we only output a cc: pair if this is +non-null (which means we had an address) + +In light of that I think changing the cli to only output +content-description if non-null seems consistent. + +Best wishes + +Mark + + + + + +On Sat, 08 Feb 2014, "W. Trevor King" wrote: +> On Sat, Feb 08, 2014 at 08:55:02AM -0400, David Bremner wrote: +>> "W. Trevor King" writes: +>> > Rather than patching this in Emacs, maybe we should collapse the +>> > =E2=80=9Cnot set=E2=80=9D and =E2=80=9Cset to empty string=E2=80=9D ca= +ses in notmuch-show.c? I +>> > can't think of any reasons why someone would want to distinguish +>> > those two cases, and it's easier all around if we standardize the +>> > representation as far upstream as possible. +>>=20 +>> Do the RFCs have anything to say about headers with empty content? +>> If not I'd be inclined to leave the CLI output as raw as possible, +>> just because people are always finding new ways to apply tools. +> +> RFC 2183 does not describe Content-Description, it just uses it in +> some examples [1]. In all the examples where Content-Description is +> present, the value is not empty. RFC 2045 defines +> Content-Description, but it doesn't give all that much information +> [2]: +> +> The ability to associate some descriptive information with a given +> body is often desirable. For example, it may be useful to mark an +> "image" body as "a picture of the Space Shuttle Endeavor." Such +> text may be placed in the Content-Description header field. This +> header field is always optional. +> +> description :=3D "Content-Description" ":" *text +> +> The description is presumed to be given in the US-ASCII character +> set, although the mechanism specified in RFC 2047 may be used for +> non-US-ASCII Content-Description values. +> +> I couldn't find more generic references to the meaning of empty header +> values, but I find it hard to imagine anyone assigning semantic value +> to an explicitly-empty description (vs. no Content-Description at +> all). +> +> Cheers, +> Trevor +> +> [1]: http://tools.ietf.org/html/rfc2183#section-3 +> [2]: http://tools.ietf.org/html/rfc2045#section-8 +> +> --=20 +> This email may be signed or encrypted with GnuPG (http://www.gnupg.org). +> For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy -- 2.26.2