New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org mu4e compose stabilization #952

Open
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@titaniumbones
Contributor

titaniumbones commented Nov 18, 2016

Hi Dirk-Jan,

Two small patches which I think fix some of the stability issuesi n org-mu4e-compose-org-mode. With these patches, I can now add a hook to compose in html by default. I know this is not best practice, but I think there are many use cases for it, and while it would be better to fix org-mu4e-compose-org-mode entirely, this may help a fair number of people.

titaniumbones added some commits Nov 18, 2016

Add mu4e-compose-post-hook
This new hook allows the user to specify an action to take place after
compose buffer has been created & major mode set, but does not attach
the hook to the major mode setting. This simplifies the use of
org-mu4e-org-compose-mode, and hopefully will bridge the gap to a more
stable replacementt for that pseudo minor mode.
minor change in org-mu4e-compose-org-mode
When turning psudo minor mode off, call `mu4e-compose-mode' before
removing post-command-hook. This may help with some looping issues.
minor change in org-mu4e-compose-org-mode
When turning pseudo minor mode off, call `mu4e-compose-mode' before
removing post-command-hook. This may help with some looping issues.
@stig

This comment has been minimized.

Show comment
Hide comment
@stig

stig Nov 19, 2016

Contributor

Hi @titaniumbones, I manually applied d60f58e to my setup (I don't use any hooks, so didn't bother applying that changeset) but I don't think it has made a difference. I'm still seeing the "Message already sent, send again?" question. I selected no, and went to the header part and hit C-c C-c and it sent without errors.

Contributor

stig commented Nov 19, 2016

Hi @titaniumbones, I manually applied d60f58e to my setup (I don't use any hooks, so didn't bother applying that changeset) but I don't think it has made a difference. I'm still seeing the "Message already sent, send again?" question. I selected no, and went to the header part and hit C-c C-c and it sent without errors.

@titaniumbones

This comment has been minimized.

Show comment
Hide comment
@titaniumbones

titaniumbones Nov 19, 2016

Contributor

Maybe that change is irrelevant. I was thinking it might be.

However, I also rewrote John's htmlize-and-send function -- see my blog
here:

http://matt.hackinghistory.ca/2016/11/18/sending-html-mail-with-mu4e/

What are you using to send your mail? Can you try my code and see if it
helps?

On 11/19/2016 06:00 PM, Stig Brautaset wrote:

Hi @titaniumbones https://github.com/titaniumbones, I manually
applied d60f58e
d60f58e
to my setup (I don't use any hooks, so didn't bother applying that
changeset) but I don't think it has made a difference. I'm still
seeing the "Message already sent, send again?" question. I selected
no, and went to the header part and hit |C-c C-c| and it sent without
errors.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#952 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAWPNAhsayBm_uTlvRM-cHef3a_adlRWks5q_3-dgaJpZM4K3BKc.

Contributor

titaniumbones commented Nov 19, 2016

Maybe that change is irrelevant. I was thinking it might be.

However, I also rewrote John's htmlize-and-send function -- see my blog
here:

http://matt.hackinghistory.ca/2016/11/18/sending-html-mail-with-mu4e/

What are you using to send your mail? Can you try my code and see if it
helps?

On 11/19/2016 06:00 PM, Stig Brautaset wrote:

Hi @titaniumbones https://github.com/titaniumbones, I manually
applied d60f58e
d60f58e
to my setup (I don't use any hooks, so didn't bother applying that
changeset) but I don't think it has made a difference. I'm still
seeing the "Message already sent, send again?" question. I selected
no, and went to the header part and hit |C-c C-c| and it sent without
errors.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#952 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAWPNAhsayBm_uTlvRM-cHef3a_adlRWks5q_3-dgaJpZM4K3BKc.

@stig

This comment has been minimized.

Show comment
Hide comment
@stig

stig Nov 20, 2016

Contributor

What are you using to send your mail? Can you try my code and
see if it helps?

My current setup is here:
https://github.com/stig/dot-files/blob/master/emacs.d/Email.org

I don't tend to actually send HTML mail, I just like to edit it in
org mode
(for footnotes etc). Because of that, moving to the header section
and
pressing C-c C-c works fine for me. Actually sending from the body
works fine
too, I just get that annoying warning.

As I don't want to send HTML emails automatically, I don't think
your code is
exactly what I need.

Contributor

stig commented Nov 20, 2016

What are you using to send your mail? Can you try my code and
see if it helps?

My current setup is here:
https://github.com/stig/dot-files/blob/master/emacs.d/Email.org

I don't tend to actually send HTML mail, I just like to edit it in
org mode
(for footnotes etc). Because of that, moving to the header section
and
pressing C-c C-c works fine for me. Actually sending from the body
works fine
too, I just get that annoying warning.

As I don't want to send HTML emails automatically, I don't think
your code is
exactly what I need.

@titaniumbones

This comment has been minimized.

Show comment
Hide comment
@titaniumbones

titaniumbones Nov 20, 2016

Contributor

I think that you will need to make sure org-mu4e-org-compose-mode has been turned OFF before you send the message. One option might be to rewrite the toggle function with an optional parameter that allows you to specify turning it off, and add that as a hook to the send function. Or something like that. Anyway, try turning the mode off manually before sending and see if it works?

Stig Brautaset writes:

What are you using to send your mail? Can you try my code and
see if it helps?

My current setup is here:
https://github.com/stig/dot-files/blob/master/emacs.d/Email.org

I don't tend to actually send HTML mail, I just like to edit it in
org mode
(for footnotes etc). Because of that, moving to the header section
and
pressing C-c C-c works fine for me. Actually sending from the body
works fine
too, I just get that annoying warning.

As I don't want to send HTML emails automatically, I don't think
your code is
exactly what I need.

Contributor

titaniumbones commented Nov 20, 2016

I think that you will need to make sure org-mu4e-org-compose-mode has been turned OFF before you send the message. One option might be to rewrite the toggle function with an optional parameter that allows you to specify turning it off, and add that as a hook to the send function. Or something like that. Anyway, try turning the mode off manually before sending and see if it works?

Stig Brautaset writes:

What are you using to send your mail? Can you try my code and
see if it helps?

My current setup is here:
https://github.com/stig/dot-files/blob/master/emacs.d/Email.org

I don't tend to actually send HTML mail, I just like to edit it in
org mode
(for footnotes etc). Because of that, moving to the header section
and
pressing C-c C-c works fine for me. Actually sending from the body
works fine
too, I just get that annoying warning.

As I don't want to send HTML emails automatically, I don't think
your code is
exactly what I need.

titaniumbones added some commits Nov 29, 2016

force use of strings for other-header in mu4e~compose-mail
org-mime and potentially other users of `compose-mail' pass a parameter
`other-headers', an alist of the form ((symbol . string)).
`mu4e~compose-mail' sends this parameter to message-add-header, which
appears to expect a string instead.  We therefore loop through
other-headers and instead pass a string to message-add-header for each
element of other-headers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment