Kill the correct buffer after sending a message
This commit is contained in:
@@ -326,6 +326,7 @@ This returns a hash table of cid -> path."
|
|||||||
ARG is passed directly to `message-send'."
|
ARG is passed directly to `message-send'."
|
||||||
;; This has to return a non-nil value so that org knows we handled the C-c C-c
|
;; This has to return a non-nil value so that org knows we handled the C-c C-c
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(save-current-buffer
|
||||||
(let ((modified (buffer-modified-p))
|
(let ((modified (buffer-modified-p))
|
||||||
;; we only restore the restriction if the sending below fails
|
;; we only restore the restriction if the sending below fails
|
||||||
(old-rest (cons (point-min) (point-max))))
|
(old-rest (cons (point-min) (point-max))))
|
||||||
@@ -343,7 +344,7 @@ ARG is passed directly to `message-send'."
|
|||||||
(insert save-text)
|
(insert save-text)
|
||||||
(narrow-to-region (car old-rest) (cdr old-rest))
|
(narrow-to-region (car old-rest) (cdr old-rest))
|
||||||
(restore-buffer-modified-p modified)
|
(restore-buffer-modified-p modified)
|
||||||
'failed)))))
|
'failed))))))
|
||||||
|
|
||||||
(defun org-mu4e-send-and-exit (&optional arg)
|
(defun org-mu4e-send-and-exit (&optional arg)
|
||||||
"Call `org-mu4e-send', the save and kill the buffer.
|
"Call `org-mu4e-send', the save and kill the buffer.
|
||||||
|
|||||||
Reference in New Issue
Block a user