emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Org-persist
@ 2024-07-30 22:07 Christian Moe
  2024-07-31  6:39 ` Christian Moe
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Moe @ 2024-07-30 22:07 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

It seems my org-persist cache has somehow been corrupted so that opening
any Org-mode file suddenly causes this odd and severe error:

File mode specification error: (wrong-type-argument listp
£”6C?’^c)

Retyping the above since the characters may turn out wrong:
(wrong-type-argument listp \277\243\254\224\3236\214C?\343\222^c)

This essentially disables Org-mode completely. Only the first few lines
are fontified, or more often none, and org functions like folding don't
work. The same if I set the buffer to text-mode and then back to
org-mode.

What is a recommended quick fix?

--

A few extra notes:

Weirdly, after closing all buffers except for *scratch*, I keep getting
the same error when I try to exit Emacs, so I cannot exit.

I can open Org files with emacs -Q.

I don't know how the corruption happened. I have had some irregular
shutdowns, etc., but this appears to have happened in the middle of an
otherwise normal Emacs session.

Yours,
Christian


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] Org-persist
  2024-07-30 22:07 [BUG] Org-persist Christian Moe
@ 2024-07-31  6:39 ` Christian Moe
  2024-07-31  6:46   ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Moe @ 2024-07-31  6:39 UTC (permalink / raw)
  To: emacs-orgmode


Fixed: I killed emacs, deleted ~/.cache/org-persist/, and things look
OK after restart.

Sorry, obvious solution, but I wasn't thinking straight last night.

I do have a backup of the org-persist directory if there's anything to
be learned from it about how this happened (but I'm traveling, and don't
have much time for forensics at the moment).

Yours,
Christian



Christian Moe writes:

> Hi,
>
> It seems my org-persist cache has somehow been corrupted so that opening
> any Org-mode file suddenly causes this odd and severe error:
>
> File mode specification error: (wrong-type-argument listp
> ..6C?.^c)
>
> Retyping the above since the characters may turn out wrong:
> (wrong-type-argument listp \277\243\254\224\3236\214C?\343\222^c)
>
> This essentially disables Org-mode completely. Only the first few lines
> are fontified, or more often none, and org functions like folding don't
> work. The same if I set the buffer to text-mode and then back to
> org-mode.
>
> What is a recommended quick fix?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] Org-persist
  2024-07-31  6:39 ` Christian Moe
@ 2024-07-31  6:46   ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2024-07-31  6:46 UTC (permalink / raw)
  To: Christian Moe; +Cc: emacs-orgmode

Christian Moe <mail@christianmoe.com> writes:

> I do have a backup of the org-persist directory if there's anything to
> be learned from it about how this happened (but I'm traveling, and don't
> have much time for forensics at the moment).

I don't think so. Not in this case.
I think that we simply need to do format check when reading the index
and refuse to load it when something is off (malformed lists or values).

AFAIU, what you see can happen in peculiar situations when the file is
corrupted, but partially - Emacs is still able to `read' it into Elisp,
but the result of reading is garbage.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-31  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30 22:07 [BUG] Org-persist Christian Moe
2024-07-31  6:39 ` Christian Moe
2024-07-31  6:46   ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).