* mu4e-compose.el: (1) ensure newline after message-separator + (2) bury, don't kill sent buffers

(1) some people were reporting a missing newline after the message
   separator, which broke editing when there was not message signature. I haven't
   been able to reproduce with the current mu4e, with either emacs 23 or 24,
   but hopefully this helps

   (2) don't kill send buffers (which may not work), bury them instead (let
   message-mode handle this). To kill the buffers, set
   message-kill-buffer-on-exit to t.
This commit is contained in:
djcb
2012-06-04 12:10:56 +02:00
parent 6c2f3b03d2
commit 248f252172

View File

@ -231,15 +231,14 @@ and the body starts. Note, in `mu4e-compose-mode, we use
separator is never written to file. Also see
`mu4e-remove-mail-header-separator'."
(save-excursion
(goto-char (point-min))
;; search for the first empty line
(if (search-forward-regexp (concat "^$"))
(replace-match
(concat (propertize mail-header-separator 'intangible t)))
;; no empty line? then append one
(progn
(goto-char (point-max))
(insert (concat "\n" mail-header-separator))))))
(let ((sepa (propertize mail-header-separator 'intangible t)))
(goto-char (point-min))
;; search for the first empty line
(if (search-forward-regexp "^$" nil t)
(replace-match sepa)
(progn ;; no empty line? then prepend one
(goto-char (point-max))
(insert (concat "\n" sepa)))))))
(defun mu4e~compose-remove-mail-header-separator ()
"Remove `mail-header-separator; we do this before saving a
@ -554,15 +553,12 @@ Gnus' `message-mode'."
(defun mu4e-sent-handler (docid path)
"Handler function, called with DOCID and PATH for the just-sent
message."
;; for Forward ('Passed') and Replied messages, try to set the appropriate
;; flag at the message forwarded or replied-to
message. For Forwarded ('Passed') and Replied messages, try to set
the appropriate flag at the message forwarded or replied-to."
(mu4e~compose-set-parent-flag path)
(kill-buffer) ;; remove the draft
(when (file-exists-p path) ;; maybe the draft was not saved at all
(mu4e~proc-remove docid)))
(defun mu4e~compose-set-parent-flag (path)
"Set the 'replied' \"R\" flag on messages we replied to, and the
'passed' \"F\" flag on message we have forwarded.