Cristi Constantin <cristi.constan...@posteo.net> writes:

> I'm just editing my normal org log files and I started seeing the errors 
> above after I upgraded to latest org-mode.
> I think I didn't upgrade for a month, so this bug is pretty new.
> It doesn't seem to do anything weird, but I see this traceback a few 
> times a day.
>
> This is the full error, so I'm reporting as requested:
>
>
> Warning (org-element-cache): org-element--cache: Org parser error in 
> 2022-log.org::178496. Resetting.
> The error was: (error "Invalid search bound (wrong side of point)")
> Backtrace:
> " backtrace-to-string(nil)
> org-element-at-point(178496)
> org-element--cache-persist-before-write((elisp org-element--cache)

Thanks for reporting!

Will it help if you add the following to you config?

(defun org-persist-clear-caches (&rest _)
  "Clear read/write caches for org-persist."
  (clrhash org-persist--write-cache)
  (clrhash org-persist--read-cache)
  nil)
  
(add-hook 'org-persist-before-read-hook #'org-persist-clear-caches)
(add-hook 'org-persist-before-write-hook #'org-persist-clear-caches)

Best,
Ihor

Reply via email to