Subject: Re: bug#30962: 26.0.91; Encrypt message when there is a key for each recipient

From: Nicolas Petton <[email-masked]>
Date: Wed, 04 Apr 2018 10:34:50 +0200

Damien Cassou <[email-masked]> writes:

Hi Damien,

> Attached patch adds support to automatically encrypt email messages when
> the epg keyring contains a key for every recipient.

Thanks, I've been using it for a few days without any issue.

> +(defun message-recipients ()
          ^^^^^^^^^^^^^^^^^^
          Would `message-all-recipients' be a better name?
> [...]
> +(ert-deftest message-recipients ()
> +  (ert-with-test-buffer (:name "message")
> +    (insert "To: Person 1 <[email-masked]>, Person 2 <[email-masked]>\n")
> +    (insert "CC: Person 3 <[email-masked]>, Person 4 <[email-masked]>\n")
> +    (insert "BCC: Person 5 <[email-masked]>, Person 6 <[email-masked]>\n")
> +    (should (equal (message-recipients)
> +                   '(("Person 1" "[email-masked]")
> +                     ("Person 2" "[email-masked]")
> +                     ("Person 3" "[email-masked]")
> +                     ("Person 4" "[email-masked]")
> +                     ("Person 5" "[email-masked]")
> +                     ("Person 6" "[email-masked]"))))))

Could you add tests for `message-all-epg-keys-available-p' as well?

Cheers,
Nico