unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: Lele Gaifax <lele@metapensiero.it>, notmuch@notmuchmail.org
Subject: Re: Forwarding a mail, with a non-ASCII signature
Date: Mon, 17 Nov 2014 14:02:18 +0000	[thread overview]
Message-ID: <cunlhna0vth.fsf@gargravarr.hh.sledj.net> (raw)
In-Reply-To: <87ioifb55d.fsf@nautilus.nautilus>

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ò" 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=raw" id)
-	     ,@body)
-	   (kill-buffer buf))))))
+	     (call-process notmuch-command nil t nil "show" "--format=raw" id))
+	   ,@body)
+	 (kill-buffer buf)))))
 
 (defun notmuch-show-turn-on-visual-line-mode ()
   "Enable Visual Line mode."

  parent reply	other threads:[~2014-11-17 14:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-16 14:18 Forwarding a mail, with a non-ASCII signature Lele Gaifax
2014-11-16 14:56 ` Jani Nikula
2014-11-16 15:43   ` Lele Gaifax
2014-11-17 12:56 ` David Edmondson
2014-11-17 16:55   ` Lele Gaifax
2014-11-17 17:25     ` David Edmondson
2014-11-18  7:04       ` David Edmondson
2014-11-17 14:02 ` David Edmondson [this message]
2014-11-28  7:35 ` David Bremner
2014-11-28 18:35   ` Lele Gaifax
2014-11-29  7:17     ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cunlhna0vth.fsf@gargravarr.hh.sledj.net \
    --to=dme@dme.org \
    --cc=lele@metapensiero.it \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).