Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in "/home/nlj/.cache/org-persist/gc-lock.eld"

From: "N. Jackson" <[email-masked]>
Date: Sun, 09 Feb 2025 23:44:41 +0000

At 18:06 +0000 on Tuesday 2025-02-04, Ihor Radchenko wrote:
>
> "N. Jackson" <[email-masked]> writes:
>
>> Yes.  Unfortunately I can report that when I woke my system from
>> suspend this morning I saw the bug -- after about eleven days.  So I
>> can say that the patch I showed above (that tests doing an atomic
>> write by renaming a temporary file) is not sufficient.
>
> This is strange. Was it still "end of file while reading"?

No.  Yes, it was exactly the same error message, but the actual
message is this:

  Warning (emacs): Emacs reader failed to read data in
  "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End of
  file during parsing"

It comes from the error handler for the condition-case in
org-persist--read-elisp-file.

(To be absolutely clear, the changes I applied to my Emacs are the
ones I showed in my earlier post[1].  This only applies the atomic
write part of your patches, not the "write index before writing
cache data" part (which I didn't see how to easily integrate into
the org-persist.el in Emacs 30).)

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75209#80