[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Please document the caching and its user options
From: |
Daniel Clemente |
Subject: |
Re: Please document the caching and its user options |
Date: |
Mon, 17 Jun 2024 12:41:18 +0000 |
> > In particular, when setting (setq org-element-cache-persistent nil)
> > org-mode *should not* create an org-persist directory anywhere. And I
> > think it shouldn't activate org-persist timers (it does now) or hooks.
> > The user's preference should be respected.
>
> Nope. "org-persist" directory is not only used by org-element. If some
> other parts of Org need to cache something, they can also store cache
> there.
>
What's the setting then to disable org-persist? I.e. to disable
creating of files like ~/.cache/org-persist/gc-lock.eld
Many people seem to want to disable all creation of org-mode related files.
> > That's a code change.
> > If you just want to update documentation, a starting point can be
> > org-element-cache-persistent's documentation, which is just "Non-nil
> > when cache should persist between Emacs sessions.", and doesn't
> > mention that some files will always be created even if it's nil. It
> > also doesn't explicitly mention that it will create files (better be
> > explicit about this), or where (or how to control where), or which
> > content (i.e. just statistics, or parts of possible private org
> > files).
>
> May you suggest an alternative docstring?
>
I don't know org-persist or org-element-cache-persistent so this needs
your input. I can start with a template, and you can fine-tune it,
expand it or rewrite it:
(defvar org-element-cache-persistent t
"Non-nil when Org element cache should persist between Emacs sessions.
Cache files are written to disk at `org-persist-directory'.
The cache will be updated regularly (as controlled by
`org-element-cache-sync-idle-time') and when Emacs is closed.
Persisting the cache to disk can speed up ................(startup?
file opening time?, agendas? ...)...... especially if you open
.......(large files? mostly unmodified files? multiple emacs
instances?).
It is not recommended if ........(you edit the same files from
different emacs instances? if the Org files include sensitive
data?).... If you use `org-crypt', note that the persisted cache may
temporarily store unencrypted data after decrypting a header.
Use `org-element-use-cache' instead to use a memory-only cache.")
I mentioned I don't know org-element-cache-persistent, I mean that as a user.
It's explained in developer terms („make the cache persistent“).
But as an user I don't know: is it good? will things be faster? are
there risks involved? can it corrupt my files? will it leave traces of
my files in other places? who should enable it? what's the downside?
etc.
My own experience, very subjective and it may be an edge case, is that
enabling org-element-cache-persistent didn't make loading my org files
faster; on the contrary, it made some things slower (including closing
Emacs).
> > I suggest making an explicit difference between "caching in memory"
> > and "caching by storing files on disk".
> > For instance:
> > (defvar org-element-use-cache t
> > "Non-nil when Org parser should cache its results.")
> > From that description, it's not clear to a new user whether they're
> > creating files on disk (as caches often do) or not.
>
> Do you mean something like
>
> "Non-nil when Org parser should cache its results.
>
> The cache is stored in-memory and may also be stored on disk if
> `org-element-cache-persistent' is non-nil (the default)."
>
> ?
This seems better.
- Re: Please document the caching and its user options, (continued)
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/15
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/15
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/16
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/16
- Re: Please document the caching and its user options, Björn Bidar, 2024/06/23
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/15
Re: Please document the caching and its user options, Jens Lechtenboerger, 2024/06/14
Re: Please document the caching and its user options, Daniel Clemente, 2024/06/16
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/16
- Re: Please document the caching and its user options,
Daniel Clemente <=
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/18
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/18
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/18
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/18
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/18
- Re: Please document the caching and its user options, Colin Baxter, 2024/06/19
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/19
- Re: Please document the caching and its user options, Eli Zaretskii, 2024/06/19
- Re: Please document the caching and its user options, Ihor Radchenko, 2024/06/19
- Re: Please document the caching and its user options, Colin Baxter, 2024/06/19