PATCH: fetch missing keys in the background

Antoine Beaupré anarcat at orangeseeds.org
Mon Sep 3 10:47:09 PDT 2018


On 2018-09-03 18:21:32, David Edmondson wrote:
> How about this patch?
>
> You'll need to set “notmuch-crypto-get-keys-asynchronously” to “t” to
> see any benefit.

This is great!

As you said on IRC, the patch is more likely:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: notmuch-async-fetch.patch
Type: text/x-diff
Size: 2696 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20180903/09a40bb2/attachment.patch>
-------------- next part --------------

One thing that's missing is to refresh the view automatically. I
understand this might be difficult to implement however. For example, I
naively tried to add this at the end of the sentinel:

      (when (= exit-status 0)
	(notmuch-show-refresh-view))

Then switch to another buffer (back to the search view, FWIW). The
sentinel then fails with:

error in process sentinel: notmuch-escape-boolean-term: Wrong type argument: stringp, nil
error in process sentinel: Wrong type argument: stringp, nil

Not sure why exactly. But I would certainly take the async update over
automatic refresh any time. It would also be useful to indicate that
will be the effect of the variable in the customize help as well. I gave
that a try in the above patch.

Thanks for the ultra-fast response!

A.

-- 
The United States is a nation of laws:
badly written and randomly enforced.
                        - Frank Zappa


More information about the notmuch mailing list