[PATCH 00/11] Improve charset and cid: handling
authorAustin Clements <amdragon@MIT.EDU>
Mon, 21 Apr 2014 18:37:37 +0000 (14:37 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:01:48 +0000 (10:01 -0800)
d2/3304443e08e9018c17b96133b810664a3b5e86 [new file with mode: 0644]

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