From c8fca6929704b9a8019d8eeb32ebe0d3312b5767 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Fri, 29 Nov 2019 15:46:14 -0700 Subject: [PATCH] Add limited support for mail forwarding Mail forwarding is not an easy feature to implement as it requires to modify the Mail User Agent. Also this is not a common use-case in my workflow and it is low priority. Michael-David Fiszer made some suggestion in Issue #11. This patch is the port of this suggestion. Signed-off-by: Michael-David Fiszer Signed-off-by: Jeremy Compostella --- org-msg.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/org-msg.el b/org-msg.el index 6e74f19..11fae81 100644 --- a/org-msg.el +++ b/org-msg.el @@ -811,8 +811,7 @@ If the current `message' buffer is a reply, the `org-msg-separator' string is inserted at the end of the editing area." (message-goto-body) - (let ((new (not (and (org-msg-message-fetch-field "to") - (org-msg-message-fetch-field "subject")))) + (let ((new (not (org-msg-message-fetch-field "subject"))) (with-original (not (= (point) (point-max)))) (reply-to)) (when (or new (org-msg-mua-call 'article-htmlp)) @@ -837,9 +836,9 @@ area." (when org-msg-signature (insert org-msg-signature)) (org-msg-edit-mode))) - (if new - (message-goto-to) - (org-msg-goto-body)))) + (if (org-msg-message-fetch-field "to") + (org-msg-goto-body) + (message-goto-to)))) (defun org-msg-ctrl-c-ctrl-c () "Send message like `message-send-and-exit'.