From d66b032a5695d8ea1282c80a1f232ccb6334a45d Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Mon, 17 Nov 2014 14:02:18 +0000 Subject: [PATCH] Re: Forwarding a mail, with a non-ASCII signature --- 05/b2b2de0002065813dee6e1441ee73ba48246eb | 120 ++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 05/b2b2de0002065813dee6e1441ee73ba48246eb diff --git a/05/b2b2de0002065813dee6e1441ee73ba48246eb b/05/b2b2de0002065813dee6e1441ee73ba48246eb new file mode 100644 index 000000000..b0a0756ee --- /dev/null +++ b/05/b2b2de0002065813dee6e1441ee73ba48246eb @@ -0,0 +1,120 @@ +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 78EE6431FBC + for ; Mon, 17 Nov 2014 06:02:30 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] + 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 JfeWIj2Yc0LF for ; + Mon, 17 Nov 2014 06:02:25 -0800 (PST) +Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com + [209.85.212.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 851AD431FB6 + for ; Mon, 17 Nov 2014 06:02:25 -0800 (PST) +Received: by mail-wi0-f171.google.com with SMTP id bs8so3309204wib.16 + for ; Mon, 17 Nov 2014 06:02:22 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:to:subject:in-reply-to:references:user-agent + :from:date:message-id:mime-version:content-type + :content-transfer-encoding; + bh=O/W+3AWo3DM1kXojqQoc7rPAnvnUEhycS6vqxK7AfDs=; + b=atk1/p3KPTYWQwLXQ0cy8rA9LUtmTl5GthElvFzgfETC2XxYcfNDhn3gtEksvoWDTL + OupL73ojXWgUKwyLYNHeuAV5hwO+J/Tz0nmg5Rllh0U0p0HwDhzhh2CY1bTEDGD6Ry4G + ZmWLeioIuwDxS3uNeLopMMYJcNeDWFos3RZL/AqWLy++wnmqg/timxzH+t8hm0CBEqIX + kN67FT7OHZbBYkHWyCfB1RErLfqU3F4AyTHUt+Cu6XrLfB6MfvPtkQAOP+alymP+TIMd + Fi0tk/wfjvZ8O4Xjmy5hHPR79o0FJWGfYBqHlu1odBBQHlfl4XcCfIu8T5axK9a8qDFr + HE7w== +X-Gm-Message-State: + ALoCoQnSKP4f614T7mZCDx2lKUsU+uM2aeod+GKZ+kdGPl7tufwPmGcHSD/66Qd892PF8bgp5oar +X-Received: by 10.180.20.201 with SMTP id p9mr31561555wie.67.1416232940950; + Mon, 17 Nov 2014 06:02:20 -0800 (PST) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by mx.google.com with ESMTPSA id + bc1sm15372262wib.16.2014.11.17.06.02.19 for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Mon, 17 Nov 2014 06:02:19 -0800 (PST) +Received: from localhost (30000@localhost [local]); + by localhost (OpenSMTPD) with ESMTPA id 77599ec8; + Mon, 17 Nov 2014 14:02:18 +0000 (UTC) +To: Lele Gaifax , notmuch@notmuchmail.org +Subject: Re: Forwarding a mail, with a non-ASCII signature +In-Reply-To: <87ioifb55d.fsf@nautilus.nautilus> +References: <87ioifb55d.fsf@nautilus.nautilus> +User-Agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +From: David Edmondson +Date: Mon, 17 Nov 2014 14:02:18 +0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +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, 17 Nov 2014 14:02:30 -0000 + +On Sun, Nov 16 2014, Lele Gaifax wrote: +> Hi all, +> +> as you can see below, my signature contains some non-ASCII characters, +> and it is stored as UTF-8 (I have `(prefer-coding-system 'utf-8)` in my +> .emacs.el) in my home as ~/.signature. +> +> Recently I started using notmuch with Emacs as the main MUA, using +> message-mode to send emails. I'm *very* satisfied, BTW! +> +> Everything works great, except that when I "forward" an email message: +> in that case, the "*unsent mail*" buffer contains the original message +> within a "#mml" tag, followed by my signature, apparently appended as +> binary (e.g. instead of "vivr=C3=B2" I see "vivr\303\262"). When I try to +> send it, I get the "Unreadable characters" prompt... +> +> I quickly inspected what notmuch-show-forward-message does, but AFAICT +> it does very little, delegating most of the work to message-mode: but +> doing the same from Gnus works ok, so I must be missing something. +> +> I also tried tweaking the message-default-charset, changing it from nil +> to utf-8, with the very same result. +> +> I'm using Emacs 24.4.51 compiled a few days ago, if that matters. + +Could you try this patch please? + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 6e03f1e..1592ca9 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -235,9 +235,9 @@ For example, if you wanted to remove an \"unread\" tag = +and add a + (let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*")))) + (with-current-buffer buf + (let ((coding-system-for-read 'no-conversion)) +- (call-process notmuch-command nil t nil "show" "--format=3Draw" id) +- ,@body) +- (kill-buffer buf)))))) ++ (call-process notmuch-command nil t nil "show" "--format=3Draw" id)) ++ ,@body) ++ (kill-buffer buf))))) +=20 + (defun notmuch-show-turn-on-visual-line-mode () + "Enable Visual Line mode." -- 2.26.2