jeremy-compostella / org-msg

OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
GNU General Public License v3.0
280 stars 60 forks source link

Minor improvements #91

Closed Chris00 closed 3 years ago

Chris00 commented 3 years ago

Not sure to understand; what behavior are you referring to?

jeremy-compostella commented 3 years ago

Not sure to understand; what behavior are you referring to?

By default without any configuration font-lock-mode is activated for any major mode which support it (see https://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html). On an Emacs instance without any configuration, if I start an email it is fontified by default.

This is also something which can customized by the user like for instance disabling font-lock-mode for a particular major mode. With your change you are enforcing a fontification of the buffer itoutside the usual Emacs way of controlling this feature.

Chris00 commented 3 years ago

Thanks, got it. It is just that, when the buffer is created, it is not correctly fontified until one presses a key. I'll see how I can fix that without forcing font-lock.

jeremy-compostella commented 3 years ago

This is weird i don't reproduce this issue even with an emacs without any configuration. Are you sure this is not caused by your configuration ?

Chris00 commented 3 years ago

This only happens when I reply to a message, not when I compose a fresh one.

Chris00 commented 3 years ago

@jeremy-compostella You were right, the error came from a problem on my side. I updated the PR accordingly.

Chris00 commented 3 years ago

[...] If you reply the To field should be set and you should end-up in the body.

Without this (message-goto-body) in org-msg-goto-body will go to the beginning of the line #+OPTIONS and not after the :PROPERTIES line—where we are supposed to write the reply. Would you prefer to change the behavior of org-msg-goto-body?

--text follows this line--
#+OPTIONS: html-postamble:nil toc:nil author:nil email:nil d:nil
#+STARTUP: 
:PROPERTIES:...
jeremy-compostella commented 3 years ago

[...] If you reply the To field should be set and you should end-up in the body.

Without this (message-goto-body) in org-msg-goto-body will go to the beginning of the line #+OPTIONS and not after the :PROPERTIES line—where we are supposed to write the reply. Would you prefer to change the behavior of org-msg-goto-body?

--text follows this line--
#+OPTIONS: html-postamble:nil toc:nil author:nil email:nil d:nil
#+STARTUP: 
:PROPERTIES:...

This is a bit confusing to me. (message-goto-body) should be the one going at the #+OPTIONS line while org-msg-goto-body should look for your signature and place the cursor before it.

Chris00 commented 3 years ago

I have no signature.

Chris00 commented 3 years ago

I did my best to follow your comments for the commits. Please let me know if I missed something.

jeremy-compostella commented 3 years ago

I use the gnus backend and you are modifying function for the mu4e backend, hence make sure you test these changes properly.

Chris00 commented 3 years ago

defining mu4e~setup-fcc-message-sent-hook-fn and mu4e~set-sent-handler-message-sent-hook-fn outside of the mu4e package is unacceptable to me.

OK, followed your suggestion.

make sure you test these changes properly.

Yes, all my email is in mu4e and I care about org-msg to work well with this MUA.

if you have no signature, org-msg-goto-body fallbacks to message-goto-body.

The more general question is whether to change the behavior of org-msg-goto-body to skip the org header lines. I've done so you can see more clearly what I mean.