unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* bounce/forward not working due to CR at line end
@ 2017-11-09 20:34 Kai Harries
  2017-11-15 12:43 ` David Bremner
  0 siblings, 1 reply; 11+ messages in thread
From: Kai Harries @ 2017-11-09 20:34 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-11-19 15:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 20:34 bounce/forward not working due to CR at line end Kai Harries
2017-11-15 12:43 ` 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

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