From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#18811: 25.0.50; Saving or visitting files with ".gpg" extension Date: Mon, 03 Nov 2014 09:57:12 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415026710 7972 80.91.229.3 (3 Nov 2014 14:58:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Nov 2014 14:58:30 +0000 (UTC) Cc: 18811@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 03 15:58:24 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 1XlJ5L-0004TC-Bq for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Nov 2014 15:58:23 +0100 Original-Received: from localhost ([::1]:35330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlJ5L-0002kC-12 for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Nov 2014 09:58:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlJ57-0002Rt-U6 for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 09:58:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlJ50-00006l-Dy for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 09:58:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlJ50-00006Z-7X for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 09:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XlJ4z-0001CV-So for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 09:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Nov 2014 14:58:01 +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.14150266434585 (code B ref 18811); Mon, 03 Nov 2014 14:58:01 +0000 Original-Received: (at 18811) by debbugs.gnu.org; 3 Nov 2014 14:57:23 +0000 Original-Received: from localhost ([127.0.0.1]:47669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XlJ4L-0001Bt-Q2 for submit@debbugs.gnu.org; Mon, 03 Nov 2014 09:57:22 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:20756) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XlJ4I-0001Bl-CD for 18811@debbugs.gnu.org; Mon, 03 Nov 2014 09:57:18 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvAMAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+yDmDGgQCAoEcFwEBfIQDAQEDAVYjBQsLDiYSFBgNJIhLCctyAQEBAQEFAgEfkQgHhEsFi2SmPIFvhBYfgnoBAQE X-IPAS-Result: AvAMAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+yDmDGgQCAoEcFwEBfIQDAQEDAVYjBQsLDiYSFBgNJIhLCctyAQEBAQEFAgEfkQgHhEsFi2SmPIFvhBYfgnoBAQE X-IronPort-AV: E=Sophos;i="5.04,797,1406606400"; d="scan'208";a="95844599" Original-Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Nov 2014 09:57:12 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 691A98597; Mon, 3 Nov 2014 09:57:12 -0500 (EST) In-Reply-To: (Dani Moncayo's message of "Mon, 3 Nov 2014 08:23:04 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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:95427 >>> 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. Stefan