From c72d070f237c76d1ee07387a53004e4c7266b03e Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Thu, 11 May 2023 11:23:14 -0400 Subject: [PATCH] [mu4e] Update mu4e only when appropriate Trigger mail update only when the server is the one currently active (the one associated to the running activity) --- global.org | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/global.org b/global.org index 13e9e08..7403578 100644 --- a/global.org +++ b/global.org @@ -764,6 +764,13 @@ ;; define 'z' as the shortcut (add-to-list 'mu4e-view-actions '("zCreate agenda item for meeting" . create-item-for-meeting) t) + (advice-add 'mu4e-update-mail-and-index :around + (lambda (orig-fun &rest args) + "Only trigger an update if the server is the one that should + currently be active; otherwise each mu4e instance will trigger an + update" + (when (string-equal server-name (kde-current-activity-name)) + (apply orig-fun args)))) (advice-add 'mu4e~header-line-format :around (lambda (orig-fun &rest args)