1

If I open an encrypted .gpg file, Emacs will prompt me for the password in the Minibuf using pinentry. However, if I try and decrypt an entry in org-crypt, it is popping up a CURSES entry in the shell that launched the Emacs GUI.

I'm seeing this with both Emacs 25 and 26.3. For some extra background, I'm trying to get this to work on a Windows machine with emacs running in WSL (after having too many issues with native Windows Emacs). On one older image (with GPG 1.4), org-crypt would prompt me in the minibuffer for the password and all was well. Then I switched to a newer VM (GPG 2.2) and Emacs hangs while a CURSES prompt appears in MobaXTerm asking for the password.

How can I configure org-crypt to trigger the same password prompt as I get for .gpg files via epa-pinentry-mode?

  • I found that if I install pinentry-qt, I will at least get a GUI popup instead of a ncurses prompt in the background. The question remains on how to move that prompt into the emacs minibuf for org-crypt as is already working in this same emacs instance for whole-file encryption of .gpg files. – Digicrat Mar 1 at 22:46
  • What is the value of epa-pinentry-mode (or epg-pinentry-mode which is the more modern spelling)? Is it loopback? If not, can you set it to loopback and see if that works? – NickD Mar 1 at 23:22
  • Setting epa/g-pinentry-mode to loopback allows me to enter the password directly in emacs. If I don't set pinentry-mode, then opening .gpg files behaves the same as I'm currently getting with org-crypt. Specifically, the password prompt is opened in whatever pinentry* service is available on the system. That was initially an ncurses terminal for me, meaning the prompt was hidden in the background shell that launched emacs. Once installing pinentry-qt, it at least uses an X11 popup, though an ugly one that splits itself between two monitors. – Digicrat Mar 3 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.