Skip to content

Conversation

@seblemaguer
Copy link
Contributor

This PR builds on top of #204 and #201 to fix several issues:

I did my best to test the different commits, but I didn't systematize it.

jsilve24 and others added 2 commits May 30, 2025 12:21
fixes jeremy-compostella#200

remove undo from message-sent-hook as it was causing an error and for html drafts to be sent after successful message sending (unintended behavior).

Also discussed in jeremy-compostella#182 where the hook was suspected to be causing problems jeremy-compostella#182

Note, in jeremy-compostella#182 multiple users report no issues after removing hook.

As requested, only turn remove hook from mu4e
org-msg.el Outdated
(insert-file-contents-literally
(mu4e-message-readable-path msg) nil nil nil t)
(org-msg-article-htmlp))))
(when msg

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of using the when-let macro instead? ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced this by when-let* as according to [1], when-let is marked as obsolete for emacs 31.1

[1] https://lists.gnu.org/archive/html/emacs-diffs/2024-10/msg00346.html

org-msg.el Outdated
(setq-local message-sent-message-via nil)
(add-hook 'message-send-hook 'org-msg-prepare-to-send nil t)
(add-hook 'message-sent-hook 'undo t t)
(if (not (equal mail-user-agent #'mu4e-user-agent))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless ?
eq ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oups, sorry for this 🤦, this is now fixed

When editing a mu4e draft, the message doesn't have parent. This leads to a "mu4e-warn: [mu4e] No message at point"
This commit aims to fix this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

org-msg leads to saving html draft after sending

5 participants