From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gregor Zattler Newsgroups: gmane.emacs.devel 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 Message-ID: <87k1te567v.fsf@len.workgroup> References: <20180404183303.27542.7640@vcs0.savannah.gnu.org> <20180404183305.17AB4202C3@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1523446434 8214 195.159.176.226 (11 Apr 2018 11:33:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2018 11:33:54 +0000 (UTC) To: emacs-devel@gnu.org, Damien Cassou , Nicolas Petton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 11 13:33:50 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6E0a-00020p-Ji for ged-emacs-devel@m.gmane.org; Wed, 11 Apr 2018 13:33:48 +0200 Original-Received: from localhost ([::1]:47675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6E0t-0003vO-EM for ged-emacs-devel@m.gmane.org; Wed, 11 Apr 2018 07:34:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6E06-0003uP-0Y for emacs-devel@gnu.org; Wed, 11 Apr 2018 07:33:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6E02-0006fv-SW for emacs-devel@gnu.org; Wed, 11 Apr 2018 07:33:18 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:33135) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6E02-0006fO-J5 for emacs-devel@gnu.org; Wed, 11 Apr 2018 07:33:14 -0400 Original-Received: from len.workgroup ([79.228.1.75]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MDQI1-1fFoMt0qtR-00Gmzd; Wed, 11 Apr 2018 13:33:10 +0200 In-Reply-To: <20180404183305.17AB4202C3@vcs0.savannah.gnu.org> Mail-Followup-To: emacs-devel@gnu.org, Damien Cassou , Nicolas Petton X-Provags-ID: V03:K1:/ZTk/uidXxrCierrFwo2sLnkHI4xwb4Q59rXikLuUIaaIZsi6vB 9SrtITqTZZwXqGz2xjQT4r/iqY5zXdXUS+XWijA0lKUsaycw4kONUIOM4YWUmqj4m7cHP/y du2r96Yk1D1K6wLuUV/UjMITsMNY7neDi9m+vmT5FmaYyf4kvkRyKOGd3DE5rS3V4swuJQO bvWYzaLuGw9hJsHdt6WvA== X-UI-Out-Filterresults: notjunk:1;V01:K0:AIc2ODb5eP0=:2RU77rNdJ/f5el4EVPWnQH WPlc/4LemVngsP3MZiO66/jcj2qlrb5SjZlQN16JoS7Kj+HCc8CIKgOeAJo86i1gsPFgEu7+l jfOBRc/8EqCNwjOIabJ8ee+284enAZusbKGGgCYhdkNFPNErjjYVgTmker3kLRU1VZA1N695W eWXgtBXbJcgmDt8yY6n6BsY1pZZXIYq5+iqjacBcXstKsDGy0AyDzG1vo/WQtuL8SUCB4CRtF CUNC/Y12TtqDeu7VeztA+stzFaVvmauX0pWz+RDXbN9iBqnEpcHx3++NuqQPnitUDh4GteRvq X6s5uXFGBmGf0B7UrR4HOxfefRLPKs9vOTf+2+9ODRQq6a6Puk3RKJhku5gyIiD4LA8ZqhQi3 hZ9Y2bqot0g03xqZNp40xIh0pons8OaE3JLVtsvrRFlFgcWb5O10qIp4BBhNZ6qq3flzy+/Hv rHex/uN4SmKWMzZMw8LcBtZF8upXmKRFMmUvK0r2wnLEmMdixYTWiq5EgwHGtXWZGmAVbgrYU RMQnJ5khbLz84KeT3CxOzKEVnAdlcNrOSbotJK1t39kTYdyGCgJWuYPTOAekFRFyeYnbOAXF+ eROtmRCNJe2tsYI1oY8Lx4HynxfFXztyuzNeesw7uH/otIgvjz095ZuM/3EzfKYY1oTnhb+Xa 72q0vsegQCOPhqj+Vhe2lTVLONe+xHTtrP5rraznGQNPCCjiRWtM++antCSDfWXZIhdzR4gAD OFaixsj0rFYOBY4ZuA3Q+8BULkKjKDJUxOb/xnY7TaOQqVv7OqNqS/bdNI2t0u7kJMyGXG4t X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224511 Archived-At: Hi Nicolas, Damien, this is great functionality! But I have problems using this: * Nicolas Petton [2018-04-04; 14:33]: > branch: master > commit 29006a6fd8e989013098b0281aa0b9efe13feb1d > Author: Damien Cassou > Commit: Nicolas Petton > > Detect if a message can be encrypted and add an MML tag >=20=20=20=20=20 > * 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. >=20=20=20=20=20 > * 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. >=20=20 > > +** 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=E2=80=99s 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