mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
emacs: Refuse requests to refresh tree views while a refresh is running
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.
This commit is contained in:
parent
0260ee371e
commit
1348212cb0
1 changed files with 2 additions and 0 deletions
|
@ -598,6 +598,8 @@ message will be \"unarchived\", i.e. the tag changes in
|
||||||
(defun notmuch-tree-refresh-view ()
|
(defun notmuch-tree-refresh-view ()
|
||||||
"Refresh view."
|
"Refresh view."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(when (get-buffer-process (current-buffer))
|
||||||
|
(error "notmuch tree process already running for current buffer"))
|
||||||
(let ((inhibit-read-only t)
|
(let ((inhibit-read-only t)
|
||||||
(basic-query notmuch-tree-basic-query)
|
(basic-query notmuch-tree-basic-query)
|
||||||
(query-context notmuch-tree-query-context)
|
(query-context notmuch-tree-query-context)
|
||||||
|
|
Loading…
Reference in a new issue