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.
This commit is contained in:
TEC 2021-07-31 01:11:11 +08:00
parent 6915490d21
commit 3fd6b2df1d
No known key found for this signature in database
GPG key ID: 779591AFDB81F06C

View file

@ -200,6 +200,15 @@
(add-hook 'mu4e-compose-pre-hook '+mu4e-set-from-address-h) (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~key-val :filter-return #'+mu4e~main-keyval-str-prettier-a)
(advice-add #'mu4e~main-action-str :override #'+mu4e~main-action-str-prettier-a) (advice-add #'mu4e~main-action-str :override #'+mu4e~main-action-str-prettier-a)
(when (featurep! :editor evil) (when (featurep! :editor evil)