From 3fd6b2df1d7fa0fdfe075016fcf002718cfe0913 Mon Sep 17 00:00:00 2001 From: TEC Date: Sat, 31 Jul 2021 01:11:11 +0800 Subject: [PATCH] Mu4e: Ensure composing buffers are writable This should always be the case, yet it doesn't seem like it always is. Just to be safe we will ensure that the buffer is not read-only. --- modules/email/mu4e/config.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 65185e860..81b0dcbb6 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -200,6 +200,15 @@ (add-hook 'mu4e-compose-pre-hook '+mu4e-set-from-address-h) + (defadvice! +mu4e-ensure-compose-writeable-a (&rest _) + "Ensure that compose buffers are writable. +This should already be the case yet it does not always seem to be." + :before #'mu4e-compose-new + :before #'mu4e-compose-reply + :before #'mu4e-compose-forward + :before #'mu4e-compose-resend + (read-only-mode -1)) + (advice-add #'mu4e~key-val :filter-return #'+mu4e~main-keyval-str-prettier-a) (advice-add #'mu4e~main-action-str :override #'+mu4e~main-action-str-prettier-a) (when (featurep! :editor evil)