bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18811: 25.0.50; Saving or visitting files with ".gpg" extension


From: Stefan Monnier
Subject: bug#18811: 25.0.50; Saving or visitting files with ".gpg" extension
Date: Mon, 03 Nov 2014 09:57:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]