Re: How to disable org-persist

2025-08-03 Thread Ihor Radchenko
Andreas Röhler writes: >> Can you try the attached patch? > > This patch would only shift the issue. What do you mean? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or suppor

Re: How to disable org-persist

2025-08-03 Thread Andreas Röhler
Am 03.08.25 um 15:17 schrieb Ihor Radchenko: Andreas Röhler writes:  ;; Automatically write the data, but only when we have write access.  (when (org-persist--check-write-access org-persist-directory) +  (unless (string= "root" (getenv "USER")) (add-hook 'kill-emacs-hook #'org-per

Re: How to disable org-persist

2025-08-03 Thread Ihor Radchenko
Andreas Röhler writes: >  ;; Automatically write the data, but only when we have write access. >  (when (org-persist--check-write-access org-persist-directory) > +  (unless (string= "root" (getenv "USER")) > (add-hook 'kill-emacs-hook #'org-persist-clear-storage-maybe) ; > Run last. >  

Re: How to disable org-persist

2025-07-30 Thread Andreas Röhler
On 29.07.25 21:58, Ihor Radchenko wrote: Andreas Röhler writes: seehttps://list.orgmode.org/orgmode/1158097067.265983.1670026787...@mail1.libero.it/ Okay, thanks, seems an old issue. But the missing user-option isn't introduced yet. As I'm not the only one complaining this, maybe fix it? P

Re: How to disable org-persist

2025-07-30 Thread tomas
On Wed, Jul 30, 2025 at 07:55:00AM +, Ihor Radchenko wrote: > to...@tuxteam.de writes: > > >> Did you disable `org-element-cache-persistent'? > > > > Not yet, I'll give it a try, thanks. Still, my takeaway from the > > discussion is that the code will persist things anyway when it > > "thinks"

Re: How to disable org-persist

2025-07-30 Thread Ihor Radchenko
to...@tuxteam.de writes: >> Did you disable `org-element-cache-persistent'? > > Not yet, I'll give it a try, thanks. Still, my takeaway from the > discussion is that the code will persist things anyway when it > "thinks" it to be right. Perhaps my take was wrong? You are not wrong. Even with what

Re: How to disable org-persist

2025-07-30 Thread tomas
On Wed, Jul 30, 2025 at 06:41:27AM +, Ihor Radchenko wrote: > to...@tuxteam.de writes: > > > I don't know whether I use features that need it. I don't miss any. > > That's fine. But I warn against suggesting this approach to others. That's why I wrote "it's not nice". > > And yes, the cache

Re: How to disable org-persist

2025-07-29 Thread Ihor Radchenko
to...@tuxteam.de writes: > I don't know whether I use features that need it. I don't miss any. That's fine. But I warn against suggesting this approach to others. > And yes, the cache would be created without my "redirection". Did you disable `org-element-cache-persistent'? -- Ihor Radchenko

Re: How to disable org-persist

2025-07-29 Thread tomas
On Wed, Jul 30, 2025 at 04:58:09AM +, Ihor Radchenko wrote: > writes: > > > Not nice (and complains regularly), but works. > > It will fail when you happen to use features that need it. > And if you do not use the features needing cache, cache will not be > created to start with. I don't kn

Re: How to disable org-persist

2025-07-29 Thread Ihor Radchenko
writes: > Not nice (and complains regularly), but works. It will fail when you happen to use features that need it. And if you do not use the features needing cache, cache will not be created to start with. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at

Re: How to disable org-persist

2025-07-29 Thread tomas
On Tue, Jul 29, 2025 at 09:53:17PM +0200, Andreas Röhler wrote: > > Am 29.07.25 um 21:28 schrieb Ihor Radchenko: > > Andreas Röhler writes: > > > > > writing to disk by org-persist is not convenient in all circumstances. > > > > > > Don't see, how to disable it. > > see > > https://list.orgmod

Re: How to disable org-persist

2025-07-29 Thread Ihor Radchenko
Andreas Röhler writes: >> see >> https://list.orgmode.org/orgmode/1158097067.265983.1670026787...@mail1.libero.it/ >> > > Okay, thanks, seems an old issue. But the missing user-option isn't > introduced yet. > > As I'm not the only one complaining this, maybe fix it? Please check the thread. I

Re: How to disable org-persist

2025-07-29 Thread Andreas Röhler
Am 29.07.25 um 21:28 schrieb Ihor Radchenko: Andreas Röhler writes: writing to disk by org-persist is not convenient in all circumstances. Don't see, how to disable it. see https://list.orgmode.org/orgmode/1158097067.265983.1670026787...@mail1.libero.it/ Okay, thanks, seems an old issu

Re: How to disable org-persist

2025-07-29 Thread Ihor Radchenko
Andreas Röhler writes: > writing to disk by org-persist is not convenient in all circumstances. > > Don't see, how to disable it. see https://list.orgmode.org/orgmode/1158097067.265983.1670026787...@mail1.libero.it/ -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode

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 > n

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 av

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 req

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 org-persist

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 > (&rest _args) t) nil t)' is not our average fi

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 except

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. W

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 that

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 do