Re: org-persist files in /tmp

2022-12-25 Thread tomas
On Sun, Dec 25, 2022 at 09:30:00AM +, Ihor Radchenko wrote: > writes: > > >> Another idea is to avoid caching of parse result for small files. > > > > I haven't been following along very closely, but seeing the > > involved complexities, I'd appreciate a knob to disable caching > > altogether

Re: org-persist files in /tmp

2022-12-25 Thread Ihor Radchenko
Max Nikulin writes: > If you demonstrate that e.g., when working with encrypted files, their > sensitive content leaks to the cache then it will raise the severity of > the issue. Nothing related to encrypted files is ever written by org-persist. Some edge cases might exist for org-crypt, but

Re: org-persist files in /tmp

2022-12-25 Thread Ihor Radchenko
writes: >> Another idea is to avoid caching of parse result for small files. > > I haven't been following along very closely, but seeing the > involved complexities, I'd appreciate a knob to disable caching > altogether. org-element-cache-persistent > My usage of Org hasn't triggered any slowdo

Re: org-persist files in /tmp

2022-12-25 Thread Ihor Radchenko
Max Nikulin writes: > Ihor, I do not like that after your latest changes temporary directory > became world readable. This is the only sane way for emacs -Q, AFAIK. And the cache will now only exist while Emacs is running (for -Q cmd arg). Removed unconditionally upon exiting. -- Ihor Radchen

Re: org-persist files in /tmp

2022-12-25 Thread Ihor Radchenko
Greg Minshall writes: >> Do we need to care about cleaning up /tmp? > > my two cents is that maybe one should not care so much about cleaning up > /tmp, but i think it's worthwhile trying not to clutter it up too much. I improved things a tiny bit more. Now, whatever is created by emacs -Q will

Re: org-persist files in /tmp

2022-12-23 Thread tomas
On Fri, Dec 23, 2022 at 09:12:52PM +0700, Max Nikulin wrote: [...] > If you demonstrate that e.g., when working with encrypted files, their > sensitive content leaks to the cache then it will raise the severity of the > issue. Of course, the always appreciated option is to provide a patch that >

Re: org-persist files in /tmp

2022-12-23 Thread Max Nikulin
On 23/12/2022 13:35, to...@tuxteam.de wrote: On Thu, Dec 22, 2022 at 11:07:52PM +0700, Max Nikulin wrote: Another idea is to avoid caching of parse result for small files. I haven't been following along very closely, but seeing the involved complexities, I'd appreciate a knob to disable cachin

Re: org-persist files in /tmp

2022-12-22 Thread tomas
On Thu, Dec 22, 2022 at 11:07:52PM +0700, Max Nikulin wrote: > On 22/12/2022 22:45, Tim Cross wrote: > > Could some of the issues people are concerned about regarding use of > > /tmp be avoided if instead the temporary files were put into ~/.cache? [...] > Another idea is to avoid caching of pars

Re: org-persist files in /tmp

2022-12-22 Thread Max Nikulin
On 22/12/2022 22:45, Tim Cross wrote: Could some of the issues people are concerned about regarding use of /tmp be avoided if instead the temporary files were put into ~/.cache? There is no ~/.cache on Windows, the fallback is ~/.emacs.d. org-persist files in ~/.emacs.d was the original source

Re: org-persist files in /tmp

2022-12-22 Thread Tim Cross
Max Nikulin writes: > On 22/12/2022 19:34, Ruijie Yu wrote: >> One possible approach to this is to have all org-persist related >> temporary directories into an overall "$TMPDIR/org-persist" directory. > > Predictable name in a "world" writable directory generally is not a good > idea. Multipl

Re: org-persist files in /tmp

2022-12-22 Thread Max Nikulin
On 22/12/2022 19:34, Ruijie Yu wrote: One possible approach to this is to have all org-persist related temporary directories into an overall "$TMPDIR/org-persist" directory. Predictable name in a "world" writable directory generally is not a good idea. Multiple users may try to run Org on the

Re: org-persist files in /tmp

2022-12-22 Thread General discussions about Org-mode.
Greg Minshall writes: > hi, Ihor, > >> Do we need to care about cleaning up /tmp? > > my two cents is that maybe one should not care so much about cleaning up > /tmp, but i think it's worthwhile trying not to clutter it up too much. > > cheers, Greg One possible approach to this is to have all

Re: org-persist files in /tmp

2022-12-21 Thread Tim Cross
Ihor Radchenko writes: > "Fraga, Eric" writes: > >> for some reason, I am now getting many (tens) directories of the form >> org-persist-NN in /tmp. These seem to include an index file and a >> cache type sub-directory structure. Why are these there and does >> anything clean them up? >>

Re: org-persist files in /tmp

2022-12-21 Thread Greg Minshall
hi, Ihor, > Do we need to care about cleaning up /tmp? my two cents is that maybe one should not care so much about cleaning up /tmp, but i think it's worthwhile trying not to clutter it up too much. cheers, Greg

Re: org-persist files in /tmp

2022-12-21 Thread Ihor Radchenko
William Denton writes: >> You should _not_ see something like >> >> ((:container >> ((index "2.7")) >> :persist-file "d0/5078fe-5e31-4ddb-95a0-93ceae58df0c" :associated nil >> :expiry never :last-access 1671637032.483552 :last-access-hr >> "2022-12-21T18:37:12+0300")) >> >> as the only conten

Re: org-persist files in /tmp

2022-12-21 Thread William Denton
On 21 December 2022, Ihor Radchenko wrote: Could be. If so, it may indicate some issue with logic. The index should not be written if the only entry inside index file is index version itself. You should _not_ see something like ((:container ((index "2.7")) :persist-file "d0/5078fe-5e31-4ddb-

Re: org-persist files in /tmp

2022-12-21 Thread Ihor Radchenko
"Fraga, Eric" writes: > On Wednesday, 21 Dec 2022 at 15:06, Ihor Radchenko wrote: >> If you run something like make test or emacs -Q + org, it is expected. >> These are throwaway directories used by org-persist for emacs -Q. > > I am not explicitly running either of those (at the moment). > > I w

Re: org-persist files in /tmp

2022-12-21 Thread Fraga, Eric
On Wednesday, 21 Dec 2022 at 15:06, Ihor Radchenko wrote: > If you run something like make test or emacs -Q + org, it is expected. > These are throwaway directories used by org-persist for emacs -Q. I am not explicitly running either of those (at the moment). I wonder if this is somehow related t

Re: org-persist files in /tmp

2022-12-21 Thread Ihor Radchenko
"Fraga, Eric" writes: > for some reason, I am now getting many (tens) directories of the form > org-persist-NN in /tmp. These seem to include an index file and a > cache type sub-directory structure. Why are these there and does > anything clean them up? > > I have nothing related to org-pe