emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Cristi Constantin <cristi.constantin@posteo.net>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] random org-mode warning [9.5.4 (9.5.4-g7c61a3 @ /home/cro/.emacs.default/straight/build/org/)]
Date: Thu, 23 Jun 2022 15:16:54 +0000	[thread overview]
Message-ID: <af7c2aa3-7879-1147-e51e-2567ef2f5aca@posteo.net> (raw)
In-Reply-To: <87fsjv7vew.fsf@localhost>

Hi Ihor,

Than you for the response! I tried the fix you suggested, but I still 
see this:

Warning (org-element-cache): org-element--cache: Org parser error in 
2022-log.org::179869. Resetting.
  The error was: (error "Invalid search bound (wrong side of point)")
  Backtrace:
"  backtrace-to-string(nil)
   org-element-at-point(179869)
   org-element--cache-persist-before-write((elisp org-element--cache) 
(:hash \"63193836117540f39113c129b8de99c6\" :file 
\"/home/cro/org/log/2022-log.org\" :inode 23336608))
run-hook-with-args-until-success(org-element--cache-persist-before-write 
(elisp org-element--cache) (:hash \"63193836117540f39113c129b8de99c6\" 
:file \"/home/cro/org/log/2022-log.org\" :inode 23336608))
   #f(compiled-function (v) #<bytecode -0x148a5c2ab59ba2da>)((elisp 
org-element--cache))
   #f(compiled-function (elt) #<bytecode 0x43f3d6737afc546>)((elisp 
org-element--cache))
   mapc(#f(compiled-function (elt) #<bytecode 0x43f3d6737afc546>) 
((elisp org-element--headline-cache) (elisp org-element--cache)))
   seq-do(#f(compiled-function (elt) #<bytecode 0x43f3d6737afc546>) 
((elisp org-element--headline-cache) (elisp org-element--cache)))
   seq-find(#f(compiled-function (v) #<bytecode -0x148a5c2ab59ba2da>) 
((elisp org-element--headline-cache) (elisp org-element--cache)))
   org-persist-write(((elisp org-element--headline-cache) (elisp 
org-element--cache)) (:hash \"63193836117540f39113c129b8de99c6\" :file 
\"/home/cro/org/log/2022-log.org\" :inode 23336608) t)
   org-persist-write-all(#<buffer 2022-log.org>)
   org-persist-write-all-buffer()
   kill-buffer(#<buffer 2022-log.org>)
   kill-current-buffer()
   funcall-interactively(kill-current-buffer)
   call-interactively(kill-current-buffer nil nil)
   command-execute(kill-current-buffer)
"

Again other than the warning message, nothing seems to be broken, but 
it's annoying.

I also see something similar when I close the tab with 
centaur-tabs-buffer-close-tab.

~ Cristi

On 6/23/22 07:20, Ihor Radchenko wrote:
> Cristi Constantin <cristi.constantin@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	other threads:[~2022-06-23 15:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 11:50 [BUG] random org-mode warning [9.5.4 (9.5.4-g7c61a3 @ /home/cro/.emacs.default/straight/build/org/)] Cristi Constantin
2022-06-23  6:20 ` Ihor Radchenko
2022-06-23 15:16   ` Cristi Constantin [this message]
2022-06-27  8:50     ` Ihor Radchenko
2022-06-29  2:10     ` Ihor Radchenko
2022-07-01 11:04       ` Cristi Constantin

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af7c2aa3-7879-1147-e51e-2567ef2f5aca@posteo.net \
    --to=cristi.constantin@posteo.net \
    --cc=cristi.constantin@posteo.ie \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /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 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).