emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-element-cache warning even when off
@ 2021-12-02 10:03 Colin Baxter 😺
  2021-12-02 10:22 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Baxter 😺 @ 2021-12-02 10:03 UTC (permalink / raw)
  To: emacs-orgmode


Hello,

I have

#+begin_src emacs-lisp
(setq org-element-use-cache nil)
(setq org-element-cache-persistent nil)
#+end_src

Yet when editing by hand a time string in a today habit I get the
warning:

--8<---------------cut here---------------start------------->8---

Warning (org-element-cache): org-element--cache: Cache corruption detected in todo.habits.org::539. Resetting.
 The error was: (error "Not an Org time string: <2021-12-0 Fri .+1d")
 Backtrace:
nil

--8<---------------cut here---------------end--------------->8---

I do not have an org-persist cache present. So I wonder where is the
cache that I am supposedly corrupting.

Best wishes

Colin Baxter.



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

* Re: org-element-cache warning even when off
  2021-12-02 10:03 org-element-cache warning even when off Colin Baxter 😺
@ 2021-12-02 10:22 ` Ihor Radchenko
  2021-12-02 11:13   ` Colin Baxter 😺
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2021-12-02 10:22 UTC (permalink / raw)
  To: Colin Baxter 😺; +Cc: emacs-orgmode

Colin Baxter 😺 <m43cap@yandex.com> writes:

> I do not have an org-persist cache present. So I wonder where is the
> cache that I am supposedly corrupting.

That warning is shown when org-element--parse-to throws an error (the
parser fails). Apparently, there is some problem with Org parser.

> Warning (org-element-cache): org-element--cache: Cache corruption detected in todo.habits.org::539. Resetting.

Can you try to copy the file text around 539 buffer point into separate
Org file and check if you are seeing this kind of error there?

>  The error was: (error "Not an Org time string: <2021-12-0 Fri .+1d")

May it happen that the text near 539 buffer point looks like "CLOCK:
[2021-10-22 Fri 10:41]--[2021]"? If so, the error may be related to
https://orgmode.org/list/87v90j2gq4.fsf@localhost

P.S. I updated the warning text on main.

Best,
Ihor


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

* Re: org-element-cache warning even when off
  2021-12-02 10:22 ` Ihor Radchenko
@ 2021-12-02 11:13   ` Colin Baxter 😺
  2021-12-02 11:22     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Baxter 😺 @ 2021-12-02 11:13 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

>>>>> Ihor Radchenko <yantar92@gmail.com> writes:

    > Colin Baxter 😺 <m43cap@yandex.com> writes:
    >> I do not have an org-persist cache present. So I wonder where is
    >> the cache that I am supposedly corrupting.

    > That warning is shown when org-element--parse-to throws an error
    > (the parser fails). Apparently, there is some problem with Org
    > parser.

    >> Warning (org-element-cache): org-element--cache: Cache corruption
    >> detected in todo.habits.org::539. Resetting.

    > Can you try to copy the file text around 539 buffer point into
    > separate Org file and check if you are seeing this kind of error
    > there?

I have done this but now do not see any warning. Further, I now don't
seem to be able to re-produce the issue at all. It could that the
original warning was spurious and reflected some stale state. I did have
multiple emacsen open at the time.

I normally have org-persist on, but occasionally I need to do multiple
edits on an agenda file. On those occasions, I switch org-persist off
and move its cache out of the way in order to avoid cache corruption
warnings and to keep the syntax highlighting. I will look out for any
cache warnings if I edit any agenda files by hand again.


Best wishes,

Colin Baxter.


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

* Re: org-element-cache warning even when off
  2021-12-02 11:13   ` Colin Baxter 😺
@ 2021-12-02 11:22     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2021-12-02 11:22 UTC (permalink / raw)
  To: Colin Baxter 😺; +Cc: emacs-orgmode

Colin Baxter 😺 <m43cap@yandex.com> writes:

> I have done this but now do not see any warning. Further, I now don't
> seem to be able to re-produce the issue at all. It could that the
> original warning was spurious and reflected some stale state. I did have
> multiple emacsen open at the time.

Note that I fixed some parser error a dozen of hours ago. Maybe it
helped. In any case, let us know if you encounter a similar warning
in future.

Best,
Ihor


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

end of thread, other threads:[~2021-12-02 11:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-02 10:03 org-element-cache warning even when off Colin Baxter 😺
2021-12-02 10:22 ` Ihor Radchenko
2021-12-02 11:13   ` Colin Baxter 😺
2021-12-02 11:22     ` 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).