unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 18811@debbugs.gnu.org
Subject: bug#18811: 25.0.50; Saving or visitting files with ".gpg" extension
Date: Mon, 03 Nov 2014 09:57:12 -0500	[thread overview]
Message-ID: <jwvwq7cs5nz.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <CAH8Pv0iZrK4_Swo_f-8rRr4j+UDrWzkqn=KM0Wjt2Xtc1wHggA@mail.gmail.com> (Dani Moncayo's message of "Mon, 3 Nov 2014 08:23:04 +0100")

>>> 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





  parent reply	other threads:[~2014-11-03 14:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 18:45 bug#18811: 25.0.50; Saving or visitting files with ".gpg" extension Dani Moncayo
2014-11-02 21:32 ` Ted Zlatanov
2014-11-04  6:28   ` Daiki Ueno
2014-11-04  7:37     ` Dani Moncayo
2014-11-03  2:40 ` Stefan Monnier
2014-11-03  7:23   ` Dani Moncayo
2014-11-03  7:36     ` Dani Moncayo
2014-11-03  8:06     ` Dani Moncayo
2014-11-03 14:57     ` Stefan Monnier [this message]
2014-11-03 16:02       ` Dani Moncayo
2014-11-03 12:04   ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvwq7cs5nz.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=18811@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).