Asynchronous notmuch-poll?

Pierre Neidhardt mail at
Fri Apr 3 02:16:18 PDT 2020


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."
   (lambda (_proc change)
     (with-current-buffer (find-if (lambda (b)
                                     (with-current-buffer b
                                       (eq major-mode 'notmuch-search-mode)))
     (message "notmuch-new: %s" change))
--8<---------------cut here---------------end--------------->8---

Seems to work alright.  Thoughts?

Pierre Neidhardt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <>

More information about the notmuch mailing list