Gustavo Barros <gusbrs.2...@gmail.com> writes: > However, I do have some Org files which contain sensitive data. I'd > like to be able to disable persistence in those files. Now, some of > them are ".org.gpg" files, and I've seen the sources of `org-persist' > and noticed persistence is inhibited for them. But I also do have some > encrypted loop devices which, once opened, have a "plain" .org file > there.
Thanks for letting us know about this scenario! > However, taking a look at `org-persist's API, I couldn't find any > obvious handle to disable persistence there. Everything I've seen > presumes I have knowledge of registered "containers", which I don't. > > Is currently `org-element' the only part of Org using persistence by > default? Is there some way to inhibit `org-persist' altogether in a > given file? (As opposed to just inhibiting `org-element' use of it > with `org-element-cache-persistent'). You can use `org-persist-before-write-hook' to disable writing selectively. You can refer to the comment in org-persist.el for explanation about the core concepts about CONTAINER and ASSOCIATED terms. Let us know if you have difficulties understanding the commentary or if you think that things can be improved. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>