I open a GPG encrypted file and am prompted for the password. I open it, edit it, and when I save it, I am prompted for the password again. I start typing and Emacs hangs with this screenshot:
Scrolling down has no effect, no shortcut has any effect, and I have to force-quit Emacs. I started using GPG to edit files today, had a different problem in my first attempt with these messages in the mini-buffer and in
error in process filter: font-lock-default-function: Variable binding depth exceeds max-specpdl-size error in process filter: Variable binding depth exceeds max-specpdl-size
In this first attempt, I could quit with
C-g and Emacs didn't hang. I succeeded in my second attempt (with two prompts for the password, the second for confirmation), and failed in attempts after that.
I have GPG 2.2.17, Emacs 26.3, and macOS 10.16.4. My Emacs initialization has:
(require 'epa-file) (epa-file-enable) (setq epg-gpg-program "/usr/local/bin/gpg")
What is the problem, and should I follow a better setup to integrate Emacs with GPG?
Update: I tried again launching from the Terminal with
emacs and I got to the
*Minibuf-22* window, but was able to quit with
C-g. The buffer
*Messages* shows the two same error messages as above with
Variable binding depth exceeds max-specpdl-size, and I am able to save the encrypted file with no problem after that, with the difference that now switching buffer windows with
C-x o moves to the mini-buffer. If I try to magnify it with
C-x 1, I get
Can’t expand minibuffer to full frame.
emacs -Q, I have no problem saving the encrypted file, even without those 3 symbolic expressions. I tried again starting Emacs from the Terminal: I had the same hang the first time, then I got the variable binding depth problem which didn't hang Emacs. I checked that the only parts of my initialization code that use
gpg are those three symbolic expressions and in mail settings, such as
(setq smtpmail-auth-credentials '(expand-file-name "~/.authinfo.gpg")).