From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8B6C8431FBD for ; Sun, 18 Nov 2012 12:26:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 TL0VcvzlJUZn for ; Sun, 18 Nov 2012 12:26:00 -0800 (PST) Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id A2843431FB6 for ; Sun, 18 Nov 2012 12:26:00 -0800 (PST) Received: by mail-qc0-f181.google.com with SMTP id x40so3133671qcp.26 for ; Sun, 18 Nov 2012 12:26:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=/ryoEeVbbtbxTcLz5cHxqA3VEqpX7LQmBsVXF7utB84=; b=Kz17bchLFc/XgSgzVrrNEp0qTzOdrmY7+SWStZi5xgnp6iRvwUbZH54O7PQ95QfjQP TG/n2dA8MHFm8G2bok08af2eqt6BeMwsJUZJ2iAqeBrBeGSblhWLTYLujbGLOQW5o4Yh 1193pqZokte9BR8BaLXWinjsNJrDAJ4P+OoVf+obzQyRXgCrMboeOPd/nDxXxU808F5T 3m3wID/4W66/IUF6fpXn7yCWFJNW+pf1Kr+MugUzQMPlAFijV4eHgIZY+c9BvQshgK1b So2KCvmonciM6KxJWzCeDNYu9aoDfo9IDlop3HbgtymoE+4nLLwcqlEVune0FsDmbc+X BjMA== Received: by 10.224.27.83 with SMTP id h19mr9802221qac.70.1353270360062; Sun, 18 Nov 2012 12:26:00 -0800 (PST) Received: from smtp.gmail.com ([66.114.71.21]) by mx.google.com with ESMTPS id z9sm4256966qeg.9.2012.11.18.12.25.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Nov 2012 12:25:59 -0800 (PST) From: Ethan Glasser-Camp To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] emacs: less guessing of character set in messages In-Reply-To: <1353269185-23210-2-git-send-email-tomi.ollila@iki.fi> References: <1353269185-23210-1-git-send-email-tomi.ollila@iki.fi> <1353269185-23210-2-git-send-email-tomi.ollila@iki.fi> User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/24.1.1 (x86_64-pc-linux-gnu) Date: Sun, 18 Nov 2012 15:25:56 -0500 Message-ID: <87pq3a1wvf.fsf@betacantrips.com> MIME-Version: 1.0 Content-Type: text/plain Cc: tomi.ollila@iki.fi 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, 18 Nov 2012 20:26:02 -0000 Tomi Ollila writes: > The macro with-current-notmuch-show-message executes command > `notmuch show --format=raw id:...` which just outputs the contents > of the mail file verbatim (into temporary buffer). In case e.g. utf-8 > locale is used the temporary buffer has buffer-file-coding-system as > utf-8. In this case Emacs converts the data to multibyte format, guessing > that input is in utf-8. > However, the "raw" (MIME) message may contain octet data in any other > 8bit format, and as no (MIME-)content spesific handling to the message > is done at this point, conversion to other formats may lose information. > By setting coding-system-for-read 'no-conversion drops the conversion part > and makes this handle input as notmuch-get-bodypart-internal() does. > This marks the broken test in previous change fixed. This looks good to me, though you might need to apply it with notmuch show --format="mbox" :). Ethan