[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 29006a6: Detect if a message can be encrypted a

From: Gregor Zattler
Subject: Re: [Emacs-diffs] master 29006a6: Detect if a message can be encrypted and add an MML tag
Date: Wed, 11 Apr 2018 13:32:20 +0200

Hi Nicolas, Damien,

this is great functionality!  But I have problems using this:
* Nicolas Petton <address@hidden> [2018-04-04; 14:33]:
> branch: master
> commit 29006a6fd8e989013098b0281aa0b9efe13feb1d
> Author: Damien Cassou <address@hidden>
> Commit: Nicolas Petton <address@hidden>
>     Detect if a message can be encrypted and add an MML tag
>     * lisp/gnus/message.el (message-all-recipients): Return a list of
>     pairs, one for each recipient in To, Cc, Bcc.
>     (message-all-epg-keys-available-p): Check that there is a public key
>     in epg for each recipient of the current message.
>     (message-sign-encrypt-if-all-keys-available): Add MML tag to sign and
>     encrypt current message if there is a public key for every recipient
>     in current message.
>     * test/lisp/gnus/message-tests.el (message-all-recipients): Test for
>     message-all-recipients.
> ---
>  etc/NEWS                        |  8 +++++++
>  lisp/gnus/message.el            | 30 +++++++++++++++++++++++++++
>  test/lisp/gnus/message-tests.el | 46 
> +++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 84 insertions(+)
> diff --git a/etc/NEWS b/etc/NEWS
> index baff966..02b31ec 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -337,6 +337,14 @@ or NextCloud hosted files and directories.
>  It was obsolete since Emacs 22.1, replaced by customize.
> +** Message
> +
> ++++
> +*** Messages can now be systematically encrypted
> +when the PGP keyring contains a public key for every recipient.  To
> +achieve this, add 'message-add-encrypt-tag-if-can-encrypt' to
> +'message-send-hook'.

When doing so I get:

run-hooks: Symbol’s function definition is void:
message-add-encrypt-tag-if-can-encrypt when sending a email.

Actually rgrepping emacs source for
"message-add-encrypt-tag-if-can-encrypt" finds only this very
NEWS entry.

Instead I added message-sign-encrypt-if-all-keys-available to
message-send-hook.  This works but there are two separate issues:

1) It adds the MML tags even if the recipients key is disabled.

2) More complicated: The UI does not provide a means to
temporarily not use encryption (when e.g. you know your
correspondent is on vacation and reads email on a smartphone
without decryption facilities).  The only way to send an
unencrypted email to a recipient for whom I have the
corresponding pub key, is to delete
message-sign-encrypt-if-all-keys-available from message-send-hook
before sending.

Thanks for working on this urgently needed feature, Gregor

reply via email to

[Prev in Thread] Current Thread [Next in Thread]