From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 75209@debbugs.gnu.org, njackson@posteo.net
Subject: bug#75209: 30.0.93; Emacs reader failed to read data in "/home/nlj/.cache/org-persist/gc-lock.eld"
Date: Sun, 05 Jan 2025 13:18:53 +0000 [thread overview]
Message-ID: <87h66dpfeq.fsf@localhost> (raw)
In-Reply-To: <86ldvp8qaz.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> writes:
>> You are right. The only problem is short-living caches that should be
>> cleared at the end of Emacs session that created it.
>
> Does this mean you have ideas for solving this problem by reading the
> file before it is written? Or does this mean you already read the
> file before writing to it?
The problem is that not every piece of cached data is stored in the
index on disk. Some caches should just live for the duration of Emacs
session that creates them.
Yet, other parallel Emacs sessions should not "GC" those transient
caches.
>> Org uses `with-temp-file'. Is there an alternative built-in and more
>> robust way to write string to file?
>
> Writing to a file is not atomic. If you instead write to a temporary
> file, then rename it to the final file name, the renaming is atomic on
> Posix filesystems.
>
> This would mean you can still use with-temp-file, but with a temporary
> file name as its argument, and you need to add a single rename-file
> call afterwards.
That's fine. I just thought that there is some existing function doing
exactly this. If not, I can do it manually, of course.
--
Ihor Radchenko // yantar92,
Org mode maintainer,
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>
next prev parent reply other threads:[~2025-01-05 13:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-30 18:48 bug#75209: 30.0.93; Emacs reader failed to read data in "/home/nlj/.cache/org-persist/gc-lock.eld" N. Jackson
2024-12-30 19:31 ` Eli Zaretskii
[not found] ` <87zfkddk1l.fsf@Phoenix>
2024-12-30 20:01 ` Eli Zaretskii
2025-01-01 17:41 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-01 18:52 ` Eli Zaretskii
2025-01-01 21:09 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-31 17:42 ` Ihor Radchenko
[not found] ` <87frm3elkr.fsf@Phoenix>
2024-12-31 19:02 ` Ihor Radchenko
2024-12-31 19:54 ` Eli Zaretskii
2025-01-01 9:42 ` Ihor Radchenko
2025-01-01 12:14 ` Eli Zaretskii
2025-01-02 17:28 ` Ihor Radchenko
2025-01-02 18:48 ` Eli Zaretskii
2025-01-05 10:03 ` Ihor Radchenko
2025-01-05 11:15 ` Eli Zaretskii
2025-01-05 13:18 ` Ihor Radchenko [this message]
2025-01-01 15:54 ` N. Jackson
2025-01-02 13:34 ` N. Jackson
2025-01-05 14:18 ` N. Jackson
2025-01-05 17:21 ` Eli Zaretskii
2025-01-06 0:58 ` N. Jackson
2025-01-06 13:49 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h66dpfeq.fsf@localhost \
--to=yantar92@posteo.net \
--cc=75209@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=njackson@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.