From: John Lenz Date: Mon, 22 Jul 2013 16:49:18 +0000 (+1900) Subject: Re: cli: add --include-html option to notmuch show X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7610d3bfa2cc28bd56da3ee44c802cc4c78ed615;p=notmuch-archives.git Re: cli: add --include-html option to notmuch show --- diff --git a/de/8d427a7eaff2489df08742f3c2d35fc410e441 b/de/8d427a7eaff2489df08742f3c2d35fc410e441 new file mode 100644 index 000000000..643536503 --- /dev/null +++ b/de/8d427a7eaff2489df08742f3c2d35fc410e441 @@ -0,0 +1,98 @@ +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 438AB431FBC + for ; Mon, 22 Jul 2013 09:49:27 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 FkmUGXQ14iOa for ; + Mon, 22 Jul 2013 09:49:21 -0700 (PDT) +Received: from smtp.rcn.com (smtp.rcn.com [69.168.97.78]) + by olra.theworths.org (Postfix) with ESMTP id 00884431FB6 + for ; Mon, 22 Jul 2013 09:49:20 -0700 (PDT) +X_CMAE_Category: 0,0 Undefined,Undefined +X-CNFS-Analysis: v=2.1 cv=G7glTbU5 c=1 sm=0 tr=0 + a=C2bPeGdon5f+QfTtoGFpIg==:117 a=C2bPeGdon5f+QfTtoGFpIg==:17 + a=K-v-2zaBAAAA:8 a=gxDP-SbUGcMA:10 a=97V-WqMTq8EA:10 + a=IkcTkHD0fZMA:10 a=3wHbS4G-AAAA:8 a=Qdy8_LB6nwUA:10 + a=IcfQHJu-0VqYzNnnZ6EA:9 a=QEXdDO2ut3YA:10 +X-CM-Score: 0 +X-Scanned-by: Cloudmark Authority Engine +Authentication-Results: smtp01.rcn.cmh.synacor.com + smtp.mail=wuzzeb@wuzzeb.org; spf=pass; sender-id=pass +Authentication-Results: smtp01.rcn.cmh.synacor.com + header.from=wuzzeb@wuzzeb.org; sender-id=pass +Received-SPF: pass (smtp01.rcn.cmh.synacor.com: domain wuzzeb.org designates + 205.178.10.182 as permitted sender) +Received: from [205.178.10.182] ([205.178.10.182:42520] helo=wuzzeb.org) + by smtp.rcn.com (envelope-from ) + (ecelerity 2.2.3.49 r(42060/42061)) with ESMTP + id 75/83-21927-F826DE15; Mon, 22 Jul 2013 12:49:19 -0400 +Received: from wuzzeb by wuzzeb.org with local (Exim 4.80.1) + (envelope-from ) + id 1V1JIU-0003N8-SA; Mon, 22 Jul 2013 11:49:18 -0500 +From: =?utf-8?Q?John_Lenz?= +To: =?utf-8?Q?Tomi_Ollila?= , +Subject: Re: cli: add --include-html option to notmuch show +Message-ID: +In-reply-to: +References: + +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable +Sender: +Date: Mon, 22 Jul 2013 11:49:18 -0500 +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, 22 Jul 2013 16:49:27 -0000 + +On Sun Jul 21 15:23 -0500 2013, Tomi Ollila wrote: +> On Tue, Jul 02 2013, John Lenz wrote: +> +> > For my client, the largest bottleneck for displaying large threads is +> > exporting each html part individually since by default notmuch will not= + +> > show the json parts. For large threads there can be quite a few parts = +and +> > each must be exported and decoded one by one. Also, I then have to dea= +l +> > with all the crazy charsets which I can do through a library but is a +> > pain. +> +> This looks like a useful option. I just wonder what effect does different= + +> charsets do to the output (is text/html content output verbatim (with jus= +t +> json/sexp escaping of '"' -characters). +> +> If you added test(s) showing what happens with different charsets +> (like one message having 3 text/html parts, one us-ascii, one iso-8859-1 +> and one utf-8) that would make things clearer and (also) protect us from = + +> regressions. +> + +Ok, I'll add some tests, but everything is converted to UTF-8 by gmime. If= + +you look, I didn't add any extra code actually. Instead I just changed +the if branch taken depending on the option and the content type. The exis= +ting +code already converted everything to UTF-8.