From ed357e201e8cdf46136ed4bb8e745b53ca0a313e Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 22 Apr 2014 14:37:37 +2000 Subject: [PATCH] [PATCH 00/11] Improve charset and cid: handling --- d2/3304443e08e9018c17b96133b810664a3b5e86 | 99 +++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 d2/3304443e08e9018c17b96133b810664a3b5e86 diff --git a/d2/3304443e08e9018c17b96133b810664a3b5e86 b/d2/3304443e08e9018c17b96133b810664a3b5e86 new file mode 100644 index 000000000..61a39460c --- /dev/null +++ b/d2/3304443e08e9018c17b96133b810664a3b5e86 @@ -0,0 +1,99 @@ +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 3E67A431FCB + for ; Mon, 21 Apr 2014 11:38:04 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 LBDAWQC8-yc5 for ; + Mon, 21 Apr 2014 11:37:58 -0700 (PDT) +Received: from dmz-mailsec-scanner-3.mit.edu (dmz-mailsec-scanner-3.mit.edu + [18.9.25.14]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 909C6431FBC + for ; Mon, 21 Apr 2014 11:37:58 -0700 (PDT) +X-AuditID: 1209190e-f79ee6d000000c40-93-53556585f2bc +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP + id 21.75.03136.58565535; Mon, 21 Apr 2014 14:37:57 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s3LIbubX009461 + for ; Mon, 21 Apr 2014 14:37:57 -0400 +Received: from drake.dyndns.org + (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com + [216.15.114.40]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s3LIbsEK029706 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) + for ; Mon, 21 Apr 2014 14:37:56 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) id 1WcJ6I-0003kq-9G + for notmuch@notmuchmail.org; Mon, 21 Apr 2014 14:37:54 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH 00/11] Improve charset and cid: handling +Date: Mon, 21 Apr 2014 14:37:37 -0400 +Message-Id: <1398105468-14317-1-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.9.1 +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFupnkeLIzCtJLcpLzFFi42IRYrdT0W1NDQ022H5cy+L6zZnMDowez1bd + Yg5gjOKySUnNySxLLdK3S+DKOHRhBXvBUo6K7bN/MTcw3mbrYuTgkBAwkdh+IbWLkRPIFJO4 + cG89UJiLQ0hgNpPEh/XzWSGc84wSl1ffhHJ+MUmsmPKHHcLZzShxseUvO0g/m4CGxLb9yxlB + bBEBaYmdd2ezgtjCAhYSe6auAYuzCKhKnDv4HKyeV8BB4l3TIUaI3XISJ49NZp3AyLOAkWEV + o2xKbpVubmJmTnFqsm5xcmJeXmqRrrFebmaJXmpK6SZGkL85Jfl2MH49qHSIUYCDUYmHt8Ao + NFiINbGsuDL3EKMkB5OSKO+rKKAQX1J+SmVGYnFGfFFpTmrxIUYJDmYlEd71mkA53pTEyqrU + onyYlDQHi5I471trq2AhgfTEktTs1NSC1CKYrAwHh5IE780UoEbBotT01Iq0zJwShDQTByfI + cB6g4RdBaniLCxJzizPTIfKnGBWlxHnbQBICIImM0jy4Xlg8vmIUB3pFmLcFpIoHGMtw3a+A + BjMBDX6yJQRkcEkiQkqqgXFa7M32DQ/520rjpM5qqa6oTvdRujDjs8dk3rAJvgl9/8q0w0xX + 9i1iMRbey6irPOn6zUoNhomKSj0W77J9PN4IPQtu1O3ZyKDrKXTsW+jb9UnhoqvfH9SPObYv + 6Xvy/p3ndgcnWEa9NezKeWlVIHK3eEfGxjXbdXqLnCcebhGdL7S9kfXsdiWW4oxEQy3mouJE + AIDmDZqiAgAA +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: Mon, 21 Apr 2014 18:38:04 -0000 + +I set out to quickly add support for cid: links in the shr renderer +and wound up making our charset handling more robust and rewriting our +content-ID handling. The test introduced in patch 2 passes in all but +one really obscure case, but only because of many unwritten and +potentially fragile assumptions that Emacs and the CLI make about each +other. + +The first three patches could reasonably go in to 0.18. The rest of +this series is certainly post-0.18, but I didn't want to lose track of +it. + +This series comes in three stages. Each depends on the earlier ones, +but each prefix makes sense on its own and could be pushed without the +later stages. + +Patch 1 is a simple clean up patch. + +Patches 2 through 7 robust-ify our charset handling in Emacs, mostly +by splitting the broken `notmuch-get-bodypart-content' API into +`notmuch-get-bodypart-binary' and `notmuch-get-bodypart-text' so a +caller can explicitly convey their requirements. + +The remaining patches improve our content-ID handling and add support +for cid: links for shr. + -- 2.26.2