all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dani Moncayo <dmoncayo@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 18811@debbugs.gnu.org
Subject: bug#18811: 25.0.50; Saving or visitting files with ".gpg" extension
Date: Mon, 3 Nov 2014 17:02:26 +0100	[thread overview]
Message-ID: <CAH8Pv0hLSBjh6Jz3jVqdKR4v65jBswoP6=PqJhR-hLnT_gNDFQ@mail.gmail.com> (raw)
In-Reply-To: <jwvwq7cs5nz.fsf-monnier+emacsbugs@gnu.org>

On Mon, Nov 3, 2014 at 3:57 PM, Stefan Monnier <monnier@iro.umontreal.ca> 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





  reply	other threads:[~2014-11-03 16:02 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
2014-11-03 16:02       ` Dani Moncayo [this message]
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

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

  git send-email \
    --in-reply-to='CAH8Pv0hLSBjh6Jz3jVqdKR4v65jBswoP6=PqJhR-hLnT_gNDFQ@mail.gmail.com' \
    --to=dmoncayo@gmail.com \
    --cc=18811@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.