unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Kai Harries <kai.harries@gmail.com>
To: notmuch@notmuchmail.org
Subject: bounce/forward not working due to CR at line end
Date: Thu, 09 Nov 2017 21:34:21 +0100	[thread overview]
Message-ID: <87d14ri436.fsf@x230.kaiha.invalid> (raw)

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

Hello,

I am new to notmuch so excuse if the fault is on my end. For me
resending and forwarding of emails are not working if
message-forward-show-mml is enabled. The problems are CR at the line
endings. With the attached two patches I got it working for me. Maybe
someone more knowledgeable can see from it what the right solution would
be. 

My configuration:
notmuch 0.25.1
Emacs 25.3.1
on GNU/Linux (NixOS 17.09)



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch of mime-to-mml --]
[-- Type: text/x-patch, Size: 581 bytes --]

--- a/mml.el	2017-11-09 21:11:26.542291084 +0100
+++ b/mml.el	2017-11-09 21:12:18.838306315 +0100
@@ -929,10 +929,11 @@
 
 (defun mime-to-mml (&optional handles)
   "Translate the current buffer (which should be a message) into MML.
 If HANDLES is non-nil, use it instead reparsing the buffer."
   ;; First decode the head.
+  (save-excursion (icalendar--clean-up-line-endings))
   (save-restriction
     (message-narrow-to-head)
     (let ((rfc2047-quote-decoded-words-containing-tspecials t))
       (mail-decode-encoded-word-region (point-min) (point-max))))
   (unless handles

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch of notmuch-show-view-raw-message --]
[-- Type: text/x-patch, Size: 926 bytes --]

--- a/notmuch-show.el	2017-11-09 21:17:05.791414308 +0100
+++ b/notmuch-show.el	2017-11-09 21:17:57.958437388 +0100
@@ -2011,20 +2011,21 @@
 (defun notmuch-show-view-raw-message ()
   "View the original source of the current message."
   (interactive)
   (let* ((id (notmuch-show-get-message-id))
 	 (buf (get-buffer-create (concat "*notmuch-raw-" id "*")))
 	 (inhibit-read-only t))
     (switch-to-buffer buf)
     (erase-buffer)
     (let ((coding-system-for-read 'no-conversion))
       (call-process notmuch-command nil t nil "show" "--format=raw" id))
+    (save-excursion (icalendar--clean-up-line-endings))
     (goto-char (point-min))
     (set-buffer-modified-p nil)
     (setq buffer-read-only t)
     (view-buffer buf 'kill-buffer-if-not-modified)))
 
 (defun notmuch-show-resume-message ()
   "Resume EDITING the current draft message."
   (interactive)
   (notmuch-draft-resume (notmuch-show-get-message-id)))
 

[-- Attachment #4: Type: text/plain, Size: 27 bytes --]


Best regards

Kai Harries

             reply	other threads:[~2017-11-09 20:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 20:34 Kai Harries [this message]
2017-11-15 12:43 ` bounce/forward not working due to CR at line end David Bremner
2017-11-15 21:08   ` Kai Harries
2017-11-15 21:48     ` David Bremner
2017-11-16 15:57       ` Tomi Ollila
2017-11-16 19:48       ` Kai Harries
2017-11-17  1:08         ` David Bremner
2017-11-17 18:16           ` Kai Harries
2017-11-18 15:30             ` David Bremner
2017-11-19 12:25             ` Gaute Hope
2017-11-19 15:33               ` Kai Harries

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=87d14ri436.fsf@x230.kaiha.invalid \
    --to=kai.harries@gmail.com \
    --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).