From: Vladimir Panteleev <git@thecybershadow.net>
To: notmuch@notmuchmail.org
Cc: Vladimir Panteleev <git@thecybershadow.net>
Subject: [PATCH] emacs: Refuse requests to refresh tree views while a refresh is running
Date: Mon, 14 Aug 2017 07:08:36 +0000 [thread overview]
Message-ID: <20170814070836.19513-1-git@thecybershadow.net> (raw)
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.
---
emacs/notmuch-tree.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 022525ae..c64a097a 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)
--
2.13.3
next reply other threads:[~2017-08-14 7:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 7:08 Vladimir Panteleev [this message]
2017-09-06 1:29 ` [PATCH] emacs: Refuse requests to refresh tree views while a refresh is running David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170814070836.19513-1-git@thecybershadow.net \
--to=git@thecybershadow.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).