gpg -ca passwords.txt
create encrypted ASCII file passwords.txt.asc
. Emacs open the file as a normal text file:
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2.0.19 (GNU/Linux)
jA0EAwMCkIp3+bQkLWJgyTQYLGVN8EUEG0BE42sEj/8PrnSzgviSiENxtK+/2n73
WXD7EtndVS/MX4lFJ96h8VozChUA
=zSwh
-----END PGP MESSAGE-----
How do I make Emacs auto-decrypt and encrypt the file when I open and save it?
Best Answer
Everything should work fine with the default configuration, but you can check your configuration.
First, you need to be sure that EasyPG Assistant is installed.
M-x
locate-library
RETepa
RET should return something like:If not, then you've to install it. (or upgrade to Emacs23 or Emacs24)
Then, check the value of the variable
auto-mode-alist
with C-hvauto-mode-alist
RET and search forepa
.If you cannot find it, add this snippet to your
.emacs
.