notmuch-tree did not protect against concurrent refreshes like
notmuch-search, meaning, hitting '=' (notmuch-refresh-this-buffer)
quickly will spawn multiple parallel notmuch processes, and clobber
the existing results in the current buffer.
* notmuch-tree.el: Add a guard to notmuch-tree-refresh-view similar to
the one in notmuch-search.
(defun notmuch-tree-refresh-view ()
"Refresh view."
(interactive)
+ (when (get-buffer-process (current-buffer))
+ (error "notmuch tree process already running for current buffer"))
(let ((inhibit-read-only t)
(basic-query notmuch-tree-basic-query)
(query-context notmuch-tree-query-context)