emacs: notmuch-poll: Let the user know we are polling

It is done synchronously and it can take a while,
so we should let the user know what is going on.
This commit is contained in:
Jonas Bernoulli 2020-08-08 13:49:48 +02:00 committed by David Bremner
parent 14c4533c43
commit 177cd31fbd

View file

@ -259,11 +259,13 @@ on the command line, and then retry your notmuch command")))
Invokes `notmuch-poll-script', \"notmuch new\", or does nothing Invokes `notmuch-poll-script', \"notmuch new\", or does nothing
depending on the value of `notmuch-poll-script'." depending on the value of `notmuch-poll-script'."
(interactive) (interactive)
(message "Polling mail...")
(if (stringp notmuch-poll-script) (if (stringp notmuch-poll-script)
(unless (string= notmuch-poll-script "") (unless (string= notmuch-poll-script "")
(unless (equal (call-process notmuch-poll-script nil nil) 0) (unless (equal (call-process notmuch-poll-script nil nil) 0)
(error "Notmuch: poll script `%s' failed!" notmuch-poll-script))) (error "Notmuch: poll script `%s' failed!" notmuch-poll-script)))
(notmuch-call-notmuch-process "new"))) (notmuch-call-notmuch-process "new"))
(message "Polling mail...done"))
(defun notmuch-bury-or-kill-this-buffer () (defun notmuch-bury-or-kill-this-buffer ()
"Undisplay the current buffer. "Undisplay the current buffer.