Re: How to disable org-persist in a given file?

2023-05-03 Thread Gustavo Barros
On Wed, 3 May 2023 at 07:55, Ihor Radchenko wrote: > This was actually just an omission in `org-persist-gc'. > Now fixed on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e11073d17 Thank you! > But do not create so much sense of urgency here. As I explained, this is >

Re: How to disable org-persist in a given file?

2023-05-03 Thread Ihor Radchenko
Gustavo Barros writes: > For the record, even ".org.gpg" files generate an entry in the cache > index. (True, not the `:persist-file' itself though). > > My ~/.cache/org-persist/index contains: > > (:container > ((elisp org-element--headline-cache) > (elisp org-element--cache)) >

Re: How to disable org-persist in a given file?

2023-05-02 Thread Gustavo Barros
On Tue, 2 May 2023 at 17:54, Ihor Radchenko wrote: > I think `recentf-save-file' for example is no different. And > org-id-locations-file. And custom-file, if you happen to save safe > buffer-local variables by answering "!" in Emacs prompt. And many many > other places. Those two are easy to

Re: How to disable org-persist in a given file?

2023-05-02 Thread Ihor Radchenko
Gustavo Barros writes: > For the record, even ".org.gpg" files generate an entry in the cache > index. (True, not the `:persist-file' itself though). > > My ~/.cache/org-persist/index contains: > > (:container > ((elisp org-element--headline-cache) > (elisp org-element--cache)) >

Re: How to disable org-persist in a given file?

2023-05-02 Thread Gustavo Barros
On Tue, 25 Apr 2023 at 07:52, Gustavo Barros wrote: > My view is that there really should be a way of doing it. Because this > has relevant security implications. And because users should be able > to have control of their data in the first place. And then if one such > a feature, necessarily

Re: How to disable org-persist in a given file?

2023-04-25 Thread Gustavo Barros
On Tue, 25 Apr 2023 at 07:21, Ihor Radchenko wrote: > > I don't understand that. Isn't persistence about keeping data across > > Emacs sessions? > > Not only. We also use org-persist to cache downloaded images from > internet and, in future, to cache image previews (currently, they just > sit in

Re: How to disable org-persist in a given file?

2023-04-25 Thread Ihor Radchenko
Gustavo Barros writes: >> We cannot just disable persistence completely. >> For example, remote image export relies on persistence to be working >> _during_ Emacs session. > > I don't understand that. Isn't persistence about keeping data across > Emacs sessions? Not only. We also use

Re: How to disable org-persist in a given file?

2023-04-23 Thread Gustavo Barros
On Sun, 23 Apr 2023 at 11:19, Ruijie Yu wrote: > Side track: remember that you have `always' and `ignore' in your > collection of functions. :) Somehow I wasn't aware of `always'. Thanks! Gustavo.

Re: How to disable org-persist in a given file?

2023-04-23 Thread General discussions about Org-mode.
Gustavo Barros writes: >> You can use `org-persist-before-write-hook' to disable writing >> selectively. > > Thanks! That's the one. Though it would be nice if a variable existed > for the purpose. `(add-hook 'org-persist-before-write-hook (lambda > ( _args) t) nil t)' is not our average file

Re: How to disable org-persist in a given file?

2023-04-23 Thread Gustavo Barros
On Sun, 23 Apr 2023 at 10:51, Ihor Radchenko wrote: > We can try (string-match mounted-file-systems default-directory). > Will it work with your setup? Wouldn't that exclude a lot of legitimate use cases? Personally, I don't see an issue in this scenario of mine for Org to handle. It's an

Re: How to disable org-persist in a given file?

2023-04-23 Thread Ihor Radchenko
Gustavo Barros writes: > On Sun, 23 Apr 2023 at 07:55, Ihor Radchenko wrote: > >> Thanks for letting us know about this scenario! > > Yes, but there's little Emacs/Org can do there, I think. Once the > volume is mounted, there's no way to tell it is meant to be treated as > an encrypted file.

Re: How to disable org-persist in a given file?

2023-04-23 Thread Gustavo Barros
Hi Ihor, On Sun, 23 Apr 2023 at 07:55, Ihor Radchenko wrote: > Thanks for letting us know about this scenario! Yes, but there's little Emacs/Org can do there, I think. Once the volume is mounted, there's no way to tell it is meant to be treated as an encrypted file. With time I'm learning

Re: How to disable org-persist in a given file?

2023-04-23 Thread Ihor Radchenko
Gustavo Barros 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

How to disable org-persist in a given file?

2023-04-22 Thread Gustavo Barros
Hi All, this is more of a question really. I moved recently to the new pretest version of Emacs and thus got the 9.6 version of Org. And after that I started to notice some saving by `org-persist' going on, and indeed I have a new associated "~/.cache/org-persist/" directory. However, I do have