From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: pgg-encrypt is a pain in the neck Date: Sat, 30 Dec 2006 13:24:17 -0500 Message-ID: References: <8f26a84d-356a-44f1-ac6a-54792380b76d@well-done.deisui.org> <93fed91b-cb8a-4de7-9a16-62c85654bab6@well-done.deisui.org> <6662a3b9-1148-4aa0-bd2d-29a67be38d76@well-done.deisui.org> <5a520e06-4ee3-4c4f-9345-d49a666516f9@well-done.deisui.org> <7f60c21d-2f66-4c4b-9abb-e377ca24a153@well-done.deisui.org> <844cd50a-ec18-4b09-a057-35bdfb5173fd@well-done.deisui.org> <8ba25607-9381-4a27-ae53-8b0f3ccc3ac1@well-done.deisui.org> <366fa6ab-42a0-4df5-a17f-4ac3d1744d78@well-done.deisui.org> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1167503290 10844 80.91.229.12 (30 Dec 2006 18:28:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Dec 2006 18:28:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 30 19:28:09 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H0iwB-0002PQ-F3 for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2006 19:28:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0iwA-0004DZ-Sy for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2006 13:28:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H0isl-000169-23 for emacs-devel@gnu.org; Sat, 30 Dec 2006 13:24:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H0isk-00015a-Ad for emacs-devel@gnu.org; Sat, 30 Dec 2006 13:24:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0isk-00015P-0i for emacs-devel@gnu.org; Sat, 30 Dec 2006 13:24:34 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H0isj-0000nj-MP for emacs-devel@gnu.org; Sat, 30 Dec 2006 13:24:33 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1H0isT-0007ZM-NI; Sat, 30 Dec 2006 13:24:17 -0500 Original-To: Daiki Ueno Original-to: Sascha Wilde Original-to: Reiner Steib In-reply-to: (message from Daiki Ueno on Sat, 30 Dec 2006 09:05:55 +0900) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64515 Archived-At: I started with the following text in my *mail* buffer: ====start==== Content-Type: text/plain; charset=ISO-8859-15 From: Richard Stallman To: peterb cc: rms Subject: Testing Reply-to: rms@gnu.org --text follows this line-- this is a test. ====end==== and I did M-x pgg-encrypt. It prompted for the recipients with no default. (mailcrypt-encrypt gets defaults from the To and CC fields.) So I entered `peterb, rms' by hand, and it encrypted the whole buffer including the header. It left nothing in the buffer except for the encrypted text. I verified by running gpg manually that the encrypted text contained the mail buffer headers. (mailcrypt-encrypt would have encrypted only the message body.) To test pgg-decrypt, I encrypted that message with mailcrypt-encrypt, which gave me the headers above plus a GPG message in the body. Then I used pgg-decrypt. It decrypted the body ok, but discarded the headers entirely. This is not an adequate replacement for mailcrypt, not as it currently works. We need to fix it now. One way to fix pgg-encrypt would be to give it heuristics like the ones mailcrypt-encrypt uses. Another would be to declare pgg-encrypt to be a "low level" interface, reliable for programs with no DWIM, and define a different command for users to encrypt their messages. What do you think should be done? As for pgg-decrypt, it has to preserve everything in the buffer aside from the encrypted text which it decrypts.