bounce/forward not working due to CR at line end

classic Classic list List threaded Threaded
1 message Options
Kai Harries Kai Harries
Reply | Threaded
Open this post in threaded view
|

bounce/forward not working due to CR at line end

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)



--- 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

--- 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)))
 


Best regards

Kai Harries

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch