Open david-alvarez-rosa opened 1 year ago
I had same question, and after check mu4e code, I realized it's related to mu4e~compose-handler
's implementation.
That function will first call mu4e-compose-mode
to change the major mode, thus its mode hook (mu4e-compose-mode-hook
) will invoke org-msg-post-setup
, which will use org-msg-goto-body
.
But, after all those things done, mu4e~compose-handler
still has something to do, which includes jumping to "to" or mail body. This jump override the effect of org-msg-goto-body
.
My temporary solution is like below, to go to body again, by adding advice to mu4e-display-buffer
. You may have a try to see if it solved your problem as well.
(defun my-goto-body-before-display (buffer-or-name &optional select)
"Replace message-goto-body with org-msg-goto-body"
(if (derived-mode-p 'org-msg-edit-mode)
(if (org-msg-message-fetch-field "to")
(org-msg-goto-body)
(message-goto-to))))
(advice-add 'mu4e-display-buffer :before #'my-goto-body-before-display)
When using
mu4e
and just after hittingR
for replying to an email the cursor position is just after the "text follows this line" message:Hitting
C-c C-b
fororg-msg-goto-body
works as expected:I'm suspecting a missing call to
org-msg-goto-body
, but from the code I see that it's where it should. Any ideas how this can be fixed?Thank you in advance!