Hi!
I am wondering why notmuch-poll is synchronous.
I tried making it asynchronous this way:
--8<---------------cut here---------------start------------->8---
(defun notmuch-poll-async ()
"Like `notmuch-poll' but asynchronous."
(notmuch-start-notmuch
"notmuch-new"
nil
(lambda (_proc change)
(with-current-buffer (find-if (lambda (b)
(with-current-buffer b
(eq major-mode 'notmuch-search-mode)))
(buffer-list))
(notmuch-refresh-this-buffer))
(message "notmuch-new: %s" change))
"new"))
--8<---------------cut here---------------end--------------->8---
Seems to work alright. Thoughts?
--
Pierre Neidhardt
https://ambrevar.xyz/