unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 1/4] emacs: Asynchronous retrieval of GPG keys
Date: Mon, 01 Oct 2018 10:48:46 +0100	[thread overview]
Message-ID: <cunefda0zgh.fsf@dme.org> (raw)
In-Reply-To: <87bm8fn4ax.fsf@tethera.net>

On Saturday, 2018-09-29 at 22:48:38 -03, David Bremner wrote:

> David Edmondson <dme@dme.org> 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?

The condition is conservative because the refresh redraws the whole
buffer. If it just updated the button directly (which I've been fiddling
with, but don't have working well yet) then we might relax the
condition.

Where would we document the behaviour?

dme.
-- 
He caught a fleeting glimpse of a man, moving uphill pursued by a bus.

  reply	other threads:[~2018-10-01  9:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 11:29 [PATCH v2 0/4] Retrieve GPG keys asynchronously David Edmondson
2018-09-07 11:29 ` [PATCH v2 1/4] emacs: Asynchronous retrieval of GPG keys David Edmondson
2018-09-30  1:48   ` David Bremner
2018-10-01  9:48     ` David Edmondson [this message]
2018-10-01 11:00       ` David Bremner
2018-09-07 11:29 ` [PATCH v2 2/4] emacs: Minor refactoring of crypto code David Edmondson
2018-09-30 12:07   ` David Bremner
2018-10-01  9:49     ` David Edmondson
2018-09-07 11:29 ` [PATCH v2 3/4] emacs: Add notmuch-crypto-gpg-program and use it David Edmondson
2018-09-30 11:34   ` David Bremner
2018-10-01  9:52     ` David Edmondson
2018-10-01 11:02       ` David Bremner
2018-09-07 11:29 ` [PATCH v2 4/4] emacs: Improve the reporting of key activity 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=cunefda0zgh.fsf@dme.org \
    --to=dme@dme.org \
    --cc=david@tethera.net \
    --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).