From 02ba2ccedc7bc0014e9e39dbc7e4d8c450e1b4e6 Mon Sep 17 00:00:00 2001 From: Justin Silverman Date: Fri, 6 Dec 2024 09:35:25 -0500 Subject: [PATCH] fixes #200 fixes #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 #182 where the hook was suspected to be causing problems #182 Note, in #182 multiple users report no issues after removing hook. As requested, only turn remove hook from mu4e --- org-msg.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org-msg.el b/org-msg.el index 558590c..032cca3 100644 --- a/org-msg.el +++ b/org-msg.el @@ -1553,7 +1553,8 @@ Type \\[org-msg-attach] to call the dispatcher for attachment \\{org-msg-edit-mode-map}" (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)) + (add-hook 'message-sent-hook 'undo t t)) (add-hook 'completion-at-point-functions 'message-completion-function nil t) (cond ((message-mail-alias-type-p 'abbrev) (mail-abbrevs-setup)) ((message-mail-alias-type-p 'ecomplete) (ecomplete-setup)))