From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.bugs Subject: bug#18811: 25.0.50; Saving or visitting files with ".gpg" extension Date: Mon, 3 Nov 2014 17:02:26 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1415030609 9960 80.91.229.3 (3 Nov 2014 16:03:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Nov 2014 16:03:29 +0000 (UTC) Cc: 18811@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 03 17:03:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XlK6B-0005b9-Of for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Nov 2014 17:03:19 +0100 Original-Received: from localhost ([::1]:35640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlK6B-0005mo-D3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Nov 2014 11:03:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlK63-0005jn-AT for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 11:03:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlK5u-0002JU-MM for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 11:03:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlK5u-0002JQ-J2 for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 11:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XlK5u-0002xq-Bw for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 11:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Nov 2014 16:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18811 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18811-submit@debbugs.gnu.org id=B18811.141503055611353 (code B ref 18811); Mon, 03 Nov 2014 16:03:02 +0000 Original-Received: (at 18811) by debbugs.gnu.org; 3 Nov 2014 16:02:36 +0000 Original-Received: from localhost ([127.0.0.1]:47731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XlK5T-0002x0-CS for submit@debbugs.gnu.org; Mon, 03 Nov 2014 11:02:36 -0500 Original-Received: from mail-wg0-f51.google.com ([74.125.82.51]:53983) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XlK5Q-0002wl-IS for 18811@debbugs.gnu.org; Mon, 03 Nov 2014 11:02:33 -0500 Original-Received: by mail-wg0-f51.google.com with SMTP id l18so11338968wgh.24 for <18811@debbugs.gnu.org>; Mon, 03 Nov 2014 08:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7LfU/TLle9QDyVbpriQVquazX4/24AqxvE0lHpNBASI=; b=OapXZ+kbmvvtIck6LsMXeRS0ycDp4IgiOCSy+KtoRILSO4z5ZqFipEE4+5Y0dLDt72 b8+0p+j6zfyQXcbbFuVwXyoWU1Q8obeX9W1JK5Y9WKOrpXEJCin4Flb80+YZPdlesr5r WEb8G6g3OT8Ypt2nwV5NjquUHYFnxYBi5J0IfVRc9viDnbJFNYb961O4Kg+w8y1lQqeN Tx0z0TqLqKmQYp88UoHoGrUo+zkclAQLV2XLEQZzfm0jy5KRU6hDg2rgmGewTYSTQQEP iEVV0BMny5+HKEtuUaXFeX7IqIwBbp7Lkf4EefkXGoo7gDTi2SgyBjB629wEdbMy/R6z lX2g== X-Received: by 10.194.250.68 with SMTP id za4mr11006802wjc.83.1415030546557; Mon, 03 Nov 2014 08:02:26 -0800 (PST) Original-Received: by 10.217.152.70 with HTTP; Mon, 3 Nov 2014 08:02:26 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95430 On Mon, Nov 3, 2014 at 3:57 PM, Stefan Monnier wrote: >>>> emacs -Q >>>> C-x C-w f . g p g RET >>>> The file is not saved. Generated Messages: >>>> Saving file c:/mingw/bin/f.gpg... >>>> Opening output file: Searching for program, no such file or directory, gpg >>> What behavior did you expect? >> See below. > > The .gpg extension is normally used for encrypted files, so C-x C-w > foo.gpg RET *should* either encrypt the file or signal an error. > Saving the file in plain text would be a major security error, I think. > > When visiting a .gpg file it would be acceptable to open it as "plain > text" and show the corresponding binary "garbage", but I'm not sure how > useful that would be. You can always use `find-file-literally' for that. > >> I didn't know about that mode, but yes, I don't think it is reasonable >> to have that mode enabled when it will certainly fail (preventing the >> user from visiting/saving a file/buffer). > > I guess for writing purposes, we could offer a write-file-literally command. > But I think it's best not to enable/disable auto-encryption-mode based > on the presence of `gpg', since there'd the be the risk that the user > saves a file as foo.gpg expecting it to be encrypted and then be very > disappointed later on to discover that for some reason Emacs failed to > find `gpg' at that time and just saved it in plain text instead. > > As for whether it should be enabled or disabled by default, we've had it > enabled for a long time with almost no complaints so far (other than > yours, obviously), so I think it's a good default. Well, I actually hit this problem by accident, because I stored the output of "gpg --export --armor my_key_id" in a file with .gpg extension. It was a surprise for me not being able to visit that file from Emacs, but IIUC, I chose a *bad* extension for the file, and I could have visited my file just disabling auto-encryption-mode. So, I think this bug report can be closed. Thank you. -- Dani Moncayo