emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-element--cache: Added org-data parent to non-headline element
@ 2024-06-13 15:18 martyhiatt
  2024-06-14 10:34 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: martyhiatt @ 2024-06-13 15:18 UTC (permalink / raw)
  To: emacs-orgmode

hi org-mode,

i'm encountering an error repeatedly in my work. (i know elisp but not org well, i also don't know how to report bugs, so apologies if i'm doing it wrong.

how i encounter it:

- working in an org file, i call clone-indirect-buffer-other-window.
- i narrow parent buffer to a subtree, and cloned buffer i open in another frame
- in cloned buffer, i move some headings or list items around, and at some point the org parsing breaks. so eg if i move a heading, it doesn't correctly calculate the end of the subtree but moves part of the next subtree with it (it splits it in the middle for example).

- i get an warning like so:

#+begin_example
⛔ Warning (org-element): org-element--cache: Added org-data parent to non-headline element: (item (:standard-properties [22226 22226 22232 22238 22238 0 (:tag) item element t (61 . 22226) nil nil nil #<buffer my-org-file.org> nil ((22225 0 "- " nil "[ ]" nil 22237) (22237 0 "- " nil "[X]" nil 22251) (22251 0 "- " nil "[ ]" nil 22273) (22273 0 "- " nil "[ ]" nil 22285) (22285 0 "- " nil "[ ]" nil 22317) (22317 0 "- " nil "[ ]" nil 22344) (22344 0 "- " nil "[X]" nil 22366)) (headline (:standard-properties [22195 22195 22221 22367 22367 0 (:title) nil element nil (61 . 22194) 22223 22367 1 #<buffer my-org-file.org> [org-element-deferred org-element--headline-deferred nil t] nil (org-data (:standard-properties [1 1 2 95144 95144 0 nil org-data nil t nil 4 95144 nil #<buffer my-org-file.org> [org-element-deferred org-element--get-global-node-properties nil t] nil nil] :path "/path/to/my-org-file.org" :fragile-cache nil))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-raw-value (0 0) nil] :title [org-element-deferred org-element-property-2 (:raw-value) nil] :level 0 :priority nil :tags nil :todo-keyword nil :todo-type nil :footnote-section-p [org-element-deferred org-element--headline-footnote-section-p nil nil] :archivedp [org-element-deferred org-element--headline-archivedp nil nil] :commentedp nil :fragile-cache nil))] :bullet "- " :checkbox off :counter nil :pre-blank 0 :tag nil))
If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report).
#+end_example

- i think the actual parsing mess ups vary, sometimes the paragraph indent will be lost, or rich text markup doesn't work properly any more, but i figure they're all derivative of the same error.

- i have to restart the file to continue working.

- i tried it also in emacs -q, same file, same cloning/narrowing, and i got a different error:

#+begin_example
Warning (org-element-cache): org-element--cache: Org parser error in my-org-file.org<2>::2131. Resetting.
The error was: (wrong-type-argument integer-or-marker-p nil)
Backtrace:
nil
Please report this to Org mode mailing list (M-x org-submit-bug-report).
#+end_example

i'm running emacs 30.0.50, gtk, cairo, daemon mode.
i'm running org 9.7-pre, installed via straight/use-package

NB: when i run in emacs -q, it runs emacs built-in version, 9.6.9.
would it be helpful to try to reproduce with emacs -q plus my own org config (it's a lot)?

i'm currently not able to upgrade to next org version as i don't want my config to break while working on this project.

thanks,
marty

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

* Re: org-element--cache: Added org-data parent to non-headline element
  2024-06-13 15:18 org-element--cache: Added org-data parent to non-headline element martyhiatt
@ 2024-06-14 10:34 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-06-14 10:34 UTC (permalink / raw)
  To: martyhiatt; +Cc: emacs-orgmode

martyhiatt@riseup.net writes:

> i'm encountering an error repeatedly in my work. (i know elisp but not org well, i also don't know how to report bugs, so apologies if i'm doing it wrong.
>
> how i encounter it:
>
> - working in an org file, i call clone-indirect-buffer-other-window.
> - i narrow parent buffer to a subtree, and cloned buffer i open in another frame
> - in cloned buffer, i move some headings or list items around, and at some point the org parsing breaks. so eg if i move a heading, it doesn't correctly calculate the end of the subtree but moves part of the next subtree with it (it splits it in the middle for example).
>
> - i get an warning like so:
>
> #+begin_example
> ⛔ Warning (org-element): org-element--cache: Added org-data parent to
> non-headline element...

I have addressed some edge cases with indirect buffers on Org 9.7.
When you finish with urgent work, may your please try upgrading?

> ...
> i'm currently not able to upgrade to next org version as i don't want my config to break while working on this project.

Meanwhile, you can set `org-element-use-cache' to nil. This will disable
the cache and get rid of the error for the time being.

-- 
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] 2+ messages in thread

end of thread, other threads:[~2024-06-14 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 15:18 org-element--cache: Added org-data parent to non-headline element martyhiatt
2024-06-14 10:34 ` 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).