diff options
| author | Vladimir Panteleev <git@thecybershadow.net> | 2017-08-14 07:08:36 +0000 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-09-05 21:50:03 -0300 |
| commit | 1348212cb051b846bbe98f6d653da45aad3dfefa (patch) | |
| tree | 4a1b285ce5dcc105940d9f76ae6ec204e2cd28b1 | |
| parent | 0260ee371ea561d3e6876ab800e934ddeacb3482 (diff) | |
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.
| -rw-r--r-- | emacs/notmuch-tree.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 220395e7..c00315e8 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -598,6 +598,8 @@ message will be \"unarchived\", i.e. the tag changes in (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) |
