feature request: fetch missing keys in the background
dme at dme.org
Mon Sep 3 09:46:00 PDT 2018
On Monday, 2018-09-03 at 11:49:09 -04, Antoine BeauprÃ© wrote:
> Because I have a rather large keyring, fetching new keys or refreshing
> old ones takes a long time. When I click on the red red button saying
> "Unknown key ID [...] or unsupported algorithm", Emacs freezes for a
> good 90 seconds. Considering I use that editor^Wvirtual machine for
> nearly everything, it's quite annoying and sends me off browsing the web
> in Firefox forever. I end up having a horde of shaven yaks and then
> finally remember that I had that key update, by which time I had
> forgotten what I was doing reading email in the first place, let alone
> what I was doing *before* opening my inbox...
> So. It would be great if Notmuch would run those key updates
> asynchronously. I am not sure how that would work: as Bremner said on
> IRC, it might make it difficult to update the button automatically. But
> I don't mind that: I can refresh the page myself. He suggested running
> things in the background when clicking with a prefix (C-u?) but I would
> argue that freezing Emacs is just a no-no in general.
> I couldn't find directly what function was called behind that button:
> "C-h k" just says it's, obviously, `push-button'. Bremner says it might
> be `notmuch-crypto-sigstatus-good-callback' which looks reasonable. I'm
> only a junior elisp programmer, but it seems to me the
> `notmuch-show-refresh-view' call there could be an asynchronous callback
> to an async `make-process' call, as opposed to `call-process', which is
> But I'd like others to chime in here: is this something that would be
> accepted? Would the above work?
I'm puzzled about the currently expected behaviour based on your
I have ânotmuch-crypto-process-mimeâ set to t.
I *don't* have âkeyserver-options auto-key-retrieveâ set in my gpg.conf,
so I don't expect to get any automatic retrieval of keys (it was
annoyingly slow sometimes).
When I read a message with a signature using a key that I don't have, I
get the expected âUnknown key ID ...â button. If I click on that button
a new window appears showing me the details of that key (with a slight
The referenced key is *not* imported into my keyring, so updating the
view of the message does nothing to change the display of the button -
it still says âUnknown key ID ...â.
Enabling âauto-key-retrieveâ changes this behaviour, as you would expect
(I see a delay opening the message while the key is retrieved, and then
the button shows it as good).
(Caveat: I'm using âremote-notmuchâ, so emacs and notmuch/gpg are on
different machines, but I don't know that this changes any of the
She's as sweet as Tupelo honey, she's an angel of the first degree.
More information about the notmuch