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 75857429E28 for ; Thu, 12 Jan 2012 10:50:01 -0800 (PST) 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 0rCBgJJHFx49 for ; Thu, 12 Jan 2012 10:50:01 -0800 (PST) Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU [18.7.68.35]) by olra.theworths.org (Postfix) with ESMTP id CECE6431FB6 for ; Thu, 12 Jan 2012 10:50:00 -0800 (PST) X-AuditID: 12074423-b7f9c6d0000008c3-a5-4f0f2b56aa5a Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP id 4C.46.02243.65B2F0F4; Thu, 12 Jan 2012 13:49:58 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q0CInvCh031248; Thu, 12 Jan 2012 13:49:57 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0CInuu8029956 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Thu, 12 Jan 2012 13:49:56 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RlPip-0006KN-CU; Thu, 12 Jan 2012 13:49:59 -0500 Date: Thu, 12 Jan 2012 13:49:59 -0500 From: Austin Clements To: David Edmondson Subject: Re: [PATCH v2] notmuch/emacs: Observe the charset of text/html parts, where known. Message-ID: <20120112184959.GE18625@mit.edu> References: <1326279001-28427-1-git-send-email-dme@dme.org> <1326375078-2279-1-git-send-email-dme@dme.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1326375078-2279-1-git-send-email-dme@dme.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IR4hTV1g3T5vc3uP2HxWLfnS1MFtdvzmR2 YPLY9fwvk8ezVbeYA5iiuGxSUnMyy1KL9O0SuDKOLPzJXvCXreJl32/mBsZjrF2MnBwSAiYS N79PZoKwxSQu3FvP1sXIxSEksI9R4t3/DcwQzgZGieMPd7NCOCeZJKY/fskC4SxhlDhyppUd pJ9FQFWi+dJbsFlsAhoS2/YvZwSxRQQUJf5/WwFWwywgLfHtdzNYjbBArMSyq+/YQGxeAR2J J7chbhISyJH4taOBESIuKHFy5hMWiF4tiRv/XgL1coDNWf6PAyTMKWAtMa+9AWykqICKxJST 29gmMArNQtI9C0n3LITuBYzMqxhlU3KrdHMTM3OKU5N1i5MT8/JSi3TN9HIzS/RSU0o3MYIC m91FeQfjn4NKhxgFOBiVeHhfCvP7C7EmlhVX5h5ilORgUhLlnaUFFOJLyk+pzEgszogvKs1J LT7EKMHBrCTCO/k8n78Qb0piZVVqUT5MSpqDRUmcV0PrnZ+QQHpiSWp2ampBahFMVoaDQ0mC 9wbIUMGi1PTUirTMnBKENBMHJ8hwHqDhp0BqeIsLEnOLM9Mh8qcYFaXEeRfJAyUEQBIZpXlw vbDE84pRHOgVYd65IO08wKQF1/0KaDAT0OCyFJCri0sSEVJSDYx7ub8EskxN2rhfrO5tssWa Fs9rpg+v7jvaz/g0rcEk/Mj7eZLuUk0zin+t+cFiV//9cOmZh3POeEuukGNP1pl4j0nxYdbd HIfDVe6rneWtn6TavKlm0P9VdCW6QDj+lqiG+VOlS7Nkao02+W/2+r395jz/H1NDn8m8lLws qeiwyyysIkCTz0WJpTgj0VCLuag4EQDGEPyVFwMAAA== 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: Thu, 12 Jan 2012 18:50:01 -0000 Quoth David Edmondson on Jan 12 at 1:31 pm: > Add the charset of text/html parts to the JSON output of 'notmuch > -show' when it is known. Observe the encoding when rendering such > parts in emacs. This seems like a fine interim solution to me, though I'd like to see a comment above the change in format_part_content_json explaining why we include the content charset for text/html and not for anything else. Perhaps something like, /* For non-HTML text/* parts, we include the content in the JSON. * Since JSON must be Unicode, we handle charset decoding here and do * not report a charset to the caller. For text/html parts, we do not * include the content. If a caller is interested in text/html parts, * it should retrieve them separately. Since this makes charset * decoding the responsibility on the caller, we report the charset * for text/html parts. */