1

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:

Emacs hangs after saving a GPG file

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 *Messages*:

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.

Starting with 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")).

3
  • 1
    Please show a complete, step-by-step recipe to reproduce the problem, starting from emacs -Q (no init file). (Or are those 3 sexps all that are needed to repro the problem, starting with emacs -Q?) Say at each step what you see and what you expected to see.
    – Drew
    Commented Nov 3, 2019 at 0:15
  • 1
    Please put any such info into your question itself. Comments can be deleted at any time. If you cannot repro the problem when starting without your init file then bisect your init file to find the culprit.
    – Drew
    Commented Nov 3, 2019 at 17:05
  • 1
    See emacs.stackexchange.com/q/78140/12340 for answers to a similar question.
    – zzantares
    Commented Sep 18, 2023 at 15:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.