Re: Forwarding a mail, with a non-ASCII signature
authorDavid Edmondson <dme@dme.org>
Mon, 17 Nov 2014 14:02:18 +0000 (14:02 +0000)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:46:44 +0000 (14:46 -0700)
05/b2b2de0002065813dee6e1441ee73ba48246eb [new file with mode: 0644]

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