Preventing decryption on Emacs startup

Hi everyone,

I’m getting started using Org-roam, and really quite liking it so far! I’ve had one problem with it, though, that may be coming from one of a few places, and I’m not an experienced-enough Emacs user to know right away how to diagnose the problem.

I’ve elected to encrypt my Org-roam files, but it seems that Org-roam prefers to decrypt them “eagerly” rather than “lazily,” in the following way: every time I start Emacs, I’m prompted to enter a passphrase for a GPG key, and immediately after I see under my mode line that all my Org-roam files are being decrypted in sequence. Unfortunately, this not only takes time (and will take more and more time as I add more notes), it also prevents me from using emacsclient, since I can’t enter the passphrase on startup.

Does anyone have any ideas about why this might be, and how to ensure that only files I actually open are decrypted? If it helps, I’m using Spacemacs (yes, sorry, I’m an Emacs newbie! :slight_smile: )

Thanks very much!

EDIT: I’m also not quite sure what purpose this round of decryption serves, since each file appears to be individually re-decrypted when I open it.

Hi there,

I think this might have been due to the first-pass we need to run to compute the links. Have you tried restarting Emacs after the initial database-build? I’d assume it’d only load files as you need them afterwards.

Hi zaeph, thanks for answering. Yes, it loads every file every time I restart Emacs, as if it were rebuilding the database on startup (which it may well be doing!).

Neither @jethro nor me work with GPG-encrypted files, which means that we haven’t spent a whole lot of time testing it, and I don’t see this changing in the near future. We’re still working on a lot of core features, and it’s hard to justify time on hardly-used features such as file-encryption right now.

Could you open an issue for this on GitHub? If it’s trivial, we’ll address it when we get a minute. If it’s more involved, you’ll probably have to wait and use non-encrypted files instead.

Sure thing; thanks very much, zaeph!