From 055de4abf611c5d5e12c770fe149c1861b402817 Mon Sep 17 00:00:00 2001 From: Dmitriy P Date: Sat, 9 Apr 2022 03:10:01 +0300 Subject: [PATCH] Don't activate org-msg mode when replying to icalendar event --- org-msg.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org-msg.el b/org-msg.el index 5a6363b..a060768 100644 --- a/org-msg.el +++ b/org-msg.el @@ -1391,8 +1391,11 @@ This function is used as an advice function of (defun org-msg-mode-mu4e () "Setup the hook for mu4e mail user agent." (if org-msg-mode - (add-hook 'mu4e-compose-mode-hook 'org-msg-post-setup) - (remove-hook 'mu4e-compose-mode-hook 'org-msg-post-setup))) + (progn (add-hook 'mu4e-compose-mode-hook 'org-msg-post-setup) + (advice-add 'mu4e-icalendar-reply + :around #'org-msg-inhibited)) + (remove-hook 'mu4e-compose-mode-hook 'org-msg-post-setup) + (advice-remove 'mu4e-icalendar-reply 'org-msg-inhibited))) (defun org-msg-mode-notmuch () "Setup the hook for notmuch mail user agent."