unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: "Antoine Beaupré" <anarcat@orangeseeds.org>, notmuch@notmuchmail.org
Subject: Re: feature request: fetch missing keys in the background
Date: Mon, 03 Sep 2018 17:46:00 +0100	[thread overview]
Message-ID: <cun36uqttpz.fsf@constant-mown.hh.sledj.net> (raw)
In-Reply-To: <871saawphm.fsf@curie.anarc.at>

On Monday, 2018-09-03 at 11:49:09 -04, Antoine Beaupré wrote:

> Hi!
>
> 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
> synchronous.
>
> 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
question.

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
delay).

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
above.)

dme.
-- 
She's as sweet as Tupelo honey, she's an angel of the first degree.

  reply	other threads:[~2018-09-03 16:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 15:49 feature request: fetch missing keys in the background Antoine Beaupré
2018-09-03 16:46 ` David Edmondson [this message]
2018-09-03 16:50   ` David Edmondson
2018-09-03 17:10   ` Antoine Beaupré
2018-09-03 17:21     ` David Edmondson
2018-09-03 17:23       ` David Edmondson
2018-09-03 17:47       ` PATCH: " Antoine Beaupré
2018-09-03 18:19         ` David Edmondson
2018-09-03 19:49       ` feature request: " Antoine Beaupré
2018-09-04 13:32         ` David Edmondson
2018-09-04 13:34           ` Antoine Beaupré
2018-09-04 13:39             ` David Edmondson
2018-09-04 14:12               ` Antoine Beaupré
2018-09-04 14:39                 ` David Bremner
2018-09-07 11:31                 ` David Edmondson

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=cun36uqttpz.fsf@constant-mown.hh.sledj.net \
    --to=dme@dme.org \
    --cc=anarcat@orangeseeds.org \
    --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).