From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id D23C06DE02CA for ; Mon, 3 Sep 2018 09:46:05 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.421 X-Spam-Level: X-Spam-Status: No, score=0.421 tagged_above=-999 required=5 tests=[AWL=-0.232, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gn5EFY9KDECl for ; Mon, 3 Sep 2018 09:46:05 -0700 (PDT) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by arlo.cworth.org (Postfix) with ESMTPS id C3FA06DE0289 for ; Mon, 3 Sep 2018 09:46:04 -0700 (PDT) Received: by mail-wr1-f52.google.com with SMTP id v17-v6so1252455wrr.9 for ; Mon, 03 Sep 2018 09:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:subject:in-reply-to:references:from:date:message-id:mime-version :content-transfer-encoding; bh=i5R1p9qkE3ZebP2bh00X6/YdROAC+RtCi1fvSxOerqo=; b=JgGJyyhA8cfF3N7U9odqBkeL2VGDFo2k97ugFNDrQZHnGm1mvw0QbOU4W0VtwwhXue u0rAmwUeTCfchx2oYE3uXdbmBdeHe2wHOho3DEADA6EmSaUJzyBfIQdwHyuhMXDR9H+s n2QPOZhPkrSTsZluJT6qqg+YvY5EJ/u7/LjI0BqXYwxIr2lASEfbro1/TENvqD8N/quu yTA6MZJ9xlQ9ewr7o2hulRx0Cml5irf/AMvsgStCvJKfIKATtH5hfy9WRjDOiw4jEvap YLq7LmyzIUCYog19B7Bnd8OUysRQ0P6yTlM7pGWK41cCoDGa5sGzl4IRECaQlT3M3ks+ F/zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:in-reply-to:references:from:date :message-id:mime-version:content-transfer-encoding; bh=i5R1p9qkE3ZebP2bh00X6/YdROAC+RtCi1fvSxOerqo=; b=E/Wbdp3zRy5xIB4WpI3dGJQl3/ZXBMNeebhavidwW9V7CSfKkFv7PjeOXKD5TzhHc0 cz4GPmGImQioN9WhbLtvKoY5fnUcM3cwdfBoMRoKseUKH4q/fHl3JPGtWKW/ZOqdHr85 6bdPkt4IWUFvXk4XSzcTTV0D0RAZT7yCS5c3KYMy3n+J3+d17nLrI9P9Y06F+95SMCAE rQO9/yOwVNvO7/8gm0HZAaNhy8gBHs/5blDKX5N2Mw/y5GVX9PhRNEWcBTNIAc99Nqqp p22KjmHakRJemW/PnrXmxU5CJjpJFGLSdiZisosYbtijELFS9pcnnRoagPv43Nz6m41o v1Sw== X-Gm-Message-State: APzg51AaCPVqNHhA+WRk10gkpISoR5lboTeiLrWFthFdSlc7G2mJiZK+ tNeB+GhAzorF+rUXdNK9wMVCoyhf4CtosQ== X-Google-Smtp-Source: ANB0VdYsWvhwd5Eb+dpsJuSut4sX16xhwlaQzrXRr7ENeTN96nFESkFAmvlgtu6sREOsJkZdwJjx+A== X-Received: by 2002:a5d:4b90:: with SMTP id b16-v6mr20639370wrt.168.1535993162605; Mon, 03 Sep 2018 09:46:02 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id 200-v6sm22912370wmv.6.2018.09.03.09.46.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 09:46:01 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 63223925; Mon, 3 Sep 2018 16:46:00 +0000 (UTC) To: Antoine =?utf-8?Q?Beaupr=C3=A9?= , notmuch@notmuchmail.org Subject: Re: feature request: fetch missing keys in the background In-Reply-To: <871saawphm.fsf@curie.anarc.at> References: <871saawphm.fsf@curie.anarc.at> X-HGTTG: constant-mown From: David Edmondson Date: Mon, 03 Sep 2018 17:46:00 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2018 16:46:05 -0000 On Monday, 2018-09-03 at 11:49:09 -04, Antoine Beaupr=C3=A9 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 =E2=80=9Cnotmuch-crypto-process-mime=E2=80=9D set to t. I *don't* have =E2=80=9Ckeyserver-options auto-key-retrieve=E2=80=9D 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 =E2=80=9CUnknown key ID ...=E2=80=9D 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 =E2=80=9CUnknown key ID ...=E2=80=9D. Enabling =E2=80=9Cauto-key-retrieve=E2=80=9D 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 =E2=80=9Cremote-notmuch=E2=80=9D, so emacs and notmuch/g= pg are on different machines, but I don't know that this changes any of the above.) dme. --=20 She's as sweet as Tupelo honey, she's an angel of the first degree.