Start a new topic

How to make emacs org-crypt encryption work as smoothly as Beorg?

Hello all,
I am enjoying the encryption extension quite a lot and it seems to work quite well in Beorg. Editing entries is really, just open, touch/face-id to decrypt, make changes, and encrypt again.


On emacs, though, the flow for symmetric encryption with org-crypt is pretty clunky.

In this example, I make 1 edit to my file, with 1 for-safety save and I get to enter the encryption password  5 times!
1. Decrypt entry, enter pass
2. edit
3. save (you know, because of org-crypt, autosave is disabled, good to save occasionally)
4. enter pass
5. enter pass again (password confirmation)
6. now text is encrypted, but we didn't finish the edit -- decrypt again
7. save for good (edit now final)
8. enter pass
9. enter pass again (password confirmation)

Why does emacs/gpg request the password every time, isn't gpg-agent supposed to remember you password for a few minutes so you do less typing (or help retrieve it from keyring)? Yes, gpg-agent is supposed to do that. It seems the issue is emacs should tell gpg-agent "need pass for key-target myfile.org" but instead its does "need pass for key-target for hash(text)." You change the text, so hash(text) changes and gpg-agent thinks you're enter a pass for something completely new.


Anyone know a way to make emacs play nicer, or customize what id org-crypt attaches to the text? Know a way to make emacs play as nice as Beorg?


I made some poor attempts to insert a shell script shim my_gpg.sh between emacs and actual gpg binaries, but epg finds the actual binaries (think it reads from system and .gnupg).


1 person has this question
1 Comment

If anyone does have an answer for this I'll add it to the FAQ section of the website.

Login or Signup to post a comment