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 9643B6DE01EC for ; Sat, 29 Sep 2018 18:48:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.002 X-Spam-Level: X-Spam-Status: No, score=0.002 tagged_above=-999 required=5 tests=[AWL=0.013, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 taE3ha5Zj73S for ; Sat, 29 Sep 2018 18:48:40 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id CA59A6DE0151 for ; Sat, 29 Sep 2018 18:48:40 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1g6Qqd-000242-Ix; Sat, 29 Sep 2018 21:48:39 -0400 Received: (nullmailer pid 14881 invoked by uid 1000); Sun, 30 Sep 2018 01:48:38 -0000 From: David Bremner To: David Edmondson , notmuch@notmuchmail.org Subject: Re: [PATCH v2 1/4] emacs: Asynchronous retrieval of GPG keys In-Reply-To: <20180907112920.3130-2-dme@dme.org> References: <20180907112920.3130-1-dme@dme.org> <20180907112920.3130-2-dme@dme.org> Date: Sat, 29 Sep 2018 22:48:38 -0300 Message-ID: <87bm8fn4ax.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain 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: Sun, 30 Sep 2018 01:48:41 -0000 David Edmondson writes: > +(defun notmuch-crypto--async-key-sentinel (process event) > + "When the user asks for a GPG key to be retrieved > +asynchronously, handle completion of that task." > + (let ((status (process-status process)) > + (exit-status (process-exit-status process)) > + (keyid (process-get process :gpg-key-id))) > + (when (memq status '(exit signal)) > + (message "Getting the GPG key %s asynchronously...%s." > + keyid > + (if (= exit-status 0) > + "completed" > + "failed")) > + ;; If the original buffer is still alive and point didn't move > + ;; (i.e. the user didn't move on or away), refresh the buffer to > + ;; show the updated signature status. This is a pretty conservative condition for the update. I can live with the tradeoff to get non-blocking updates, but I think it will surprise people used to the button updating to have it not do so when they move the point away. So I guess this behavior should be documented in a more user visible way?