In Linux, easypg can be easily used to encrypt text files. Recently, work has been migrated to windows, so some things have to be configured in windows.
To use easypg in windows, install gpg4win to replace GnuPG in Linux.
After the installation is successful, an execution path is automatically added to the system path. The default installation path is
C:/program files/GNU/GnuPG/pub
Of course, you can also specify the path of the GPG executable file in. emacs, similar to the followingCode(Declaration: I copied the chunhui code. I did not test it carefully. I asked him if I had any questions !) :
(Custom-set-variables '(EPA-file-name-Regexp"\. GPG\\(~\\|\\.~ [0-9] + ~\\)? \\'") '(EPG-GPG-Program"C:/program files/GNU/GnuPG/pub/gpg2.exe"))
If the following error is prompted, your GnuPG installation or configuration is incorrect. As a result, emacs does not know how to read the file:
File exists, but cannot be read
Thanks to Shui muCommunityChunhui code and help.