From 78ffccfb2d2ee87b04c6c5179a7d205d37ad129b Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Wed, 16 Oct 2013 15:08:12 +0200 Subject: [PATCH] * mu4e/mu4e-utils.el (mu4e-update-mail-and-index): Don't run a new process if one is already running. --- mu4e/mu4e-utils.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index d8dc162a..9b039942 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -805,6 +805,10 @@ The messages are inserted into the process buffer." run-in-background is non-nil (or called with prefix-argument), run in the background; otherwise, pop up a window." (interactive "P") + (when (and mu4e~update-buffer-name + (get-buffer-process + (get-buffer mu4e~update-buffer-name))) + (mu4e-error "Update process is already running")) (run-hooks 'mu4e-update-pre-hook) (unless mu4e-get-mail-command (mu4e-error "`mu4e-get-mail-command' is not defined"))