On 7/17/24 17:59, Ihor Radchenko wrote:
martyhi...@riseup.net writes:

(setq org-element--cache-self-verify 'backtrace)


i have a backtrace from my file, but it contains information i don't
want to post to a public mailing list (my essay/notes). i tried again
in a partly lorem ipsum-ified file and received the backtrace below
when moving todo items around.

is that of any help?

It does not look like a complete backtrace. Was there anything else in
the warning buffer?

i copied the whole warning buffer after an error was triggered.


when playing around i noticed that the error only occurs when
narrowing is in effect: i narrow in the main window then can cause the
error in the secondary/cloned one.

This is useful information.

Also, since you are able to reproduce quickly with a constructed file,
any chance that you can also create a reproducer starting from clean
Emacs config?


i had another go:

- i made a purely lorem ipsum org file (can share if needed)
- loaded a minimal emacs config (the one i use for testing/debugging 
mastodon.el, can share)
- loaded a really minimal org config (can share if needed)
- loaded the org file
- repeated the already mentioned steps, triggering the error.

with this test file, when the error is triggered, the way the file breaks is 
that a second-level TODO heading is split after the first star, becoming a 
top-level heading with a single star on a previous line (often, not sure if 
always, i think other breakages happen also, with my original file other 
breakages happened).

a backtrace is below.

sometimes the warnings buffer gets subsequent information added to it, but i 
gather that's because we continue operating with a borked file. the backtrace 
below is a copy of the whole warnings buffer after only one error was triggered.

marty


⛔ Warning (org-element): org-element--cache: (org-metadown) Cached element is incorrect in 
org-bug-no-footnotes.org<2>. (Cache tic up to date: "no") Resetting.
If this warning appears regularly, please report the warning text to Org mode 
mailing list (M-x org-submit-bug-report).
The element is: "(headline (:standard-properties [342 342 nil nil 449 0 (:title) nil element t 
nil nil nil 2 #<buffer org-bug-no-footnotes.org> [org-element-deferred 
org-element--headline-deferred nil t] nil (headline (:standard-properties [3 3 20 2159 2159 0 ... 
first-section element t nil 22 2159 1 #<buffer org-bug-no-footnotes.org> [org-element-deferred 
org-element--headline-deferred nil t] nil ...] :pre-blank 1 :raw-value [org-element-deferred 
org-element--headline-raw-value ... t] :title [org-element-deferred org-element-property-2 ... nil] 
:level 1 :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))] 
:pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title (t) t] :title 
[org-element-deferred org-element--headline-parse-title (t) t] :level [org-element-deferred 
org-element--headline-parse-title (t) t] :priority [org-element-deferred 
org-element--headline-parse-title (t) t] :tags [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-type [org-element-deferred 
org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred 
org-element--headline-parse-title (t) t] :archivedp [org-element-deferred 
org-element--headline-parse-title (t) t] :commentedp [org-element-deferred 
org-element--headline-parse-title (t) t]))"
 The real element is: "(headline (:standard-properties [339 339 nil nil 343 0 (:title) nil 
nil nil nil nil nil 2 #<buffer org-bug-no-footnotes.org> [org-element-deferred 
org-element--headline-deferred nil t] nil [org-element-deferred 
org-element--headline-parent-deferred nil t]] :pre-blank 0 :raw-value [org-element-deferred 
org-element--headline-parse-title (t) t] :title [org-element-deferred 
org-element--headline-parse-title (t) t] :level [org-element-deferred 
org-element--headline-parse-title (t) t] :priority [org-element-deferred 
org-element--headline-parse-title (t) t] :tags [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-type [org-element-deferred 
org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred 
org-element--headline-parse-title (t) t] :archivedp [org-element-deferred 
org-element--headline-parse-title (t) t] :commentedp [org-element-deferred 
org-element--headline-parse-title (t) t]))"
 Cache around :begin:
"(headline (:standard-properties [235 235 nil nil 342 0 (:title) nil element t nil nil nil 2 
#<buffer org-bug-no-footnotes.org> [org-element-deferred org-element--headline-deferred nil t] 
nil (headline (:standard-properties [3 3 20 2159 2159 0 ... first-section element t nil 22 2159 1 
#<buffer org-bug-no-footnotes.org> [org-element-deferred org-element--headline-deferred nil t] 
nil ...] :pre-blank 1 :raw-value [org-element-deferred org-element--headline-raw-value ... t] :title 
[org-element-deferred org-element-property-2 ... nil] :level 1 :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))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title 
(t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level 
[org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred 
org-element--headline-parse-title (t) t] :tags [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-type [org-element-deferred 
org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred 
org-element--headline-parse-title (t) t] :archivedp [org-element-deferred 
org-element--headline-parse-title (t) t] :commentedp [org-element-deferred 
org-element--headline-parse-title (t) t]))"
"(headline (:standard-properties [235 235 nil nil 342 0 (:title) nil element t nil nil nil 2 
#<buffer org-bug-no-footnotes.org> [org-element-deferred org-element--headline-deferred nil t] 
nil (headline (:standard-properties [3 3 20 2159 2159 0 ... first-section element t nil 22 2159 1 
#<buffer org-bug-no-footnotes.org> [org-element-deferred org-element--headline-deferred nil t] 
nil ...] :pre-blank 1 :raw-value [org-element-deferred org-element--headline-raw-value ... t] :title 
[org-element-deferred org-element-property-2 ... nil] :level 1 :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))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title 
(t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level 
[org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred 
org-element--headline-parse-title (t) t] :tags [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-type [org-element-deferred 
org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred 
org-element--headline-parse-title (t) t] :archivedp [org-element-deferred 
org-element--headline-parse-title (t) t] :commentedp [org-element-deferred 
org-element--headline-parse-title (t) t]))"
"(headline (:standard-properties [342 342 nil nil 449 0 (:title) nil element t nil nil nil 2 
#<buffer org-bug-no-footnotes.org> [org-element-deferred org-element--headline-deferred nil t] 
nil (headline (:standard-properties [3 3 20 2159 2159 0 ... first-section element t nil 22 2159 1 
#<buffer org-bug-no-footnotes.org> [org-element-deferred org-element--headline-deferred nil t] 
nil ...] :pre-blank 1 :raw-value [org-element-deferred org-element--headline-raw-value ... t] :title 
[org-element-deferred org-element-property-2 ... nil] :level 1 :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))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title 
(t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level 
[org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred 
org-element--headline-parse-title (t) t] :tags [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred 
org-element--headline-parse-title (t) t] :todo-type [org-element-deferred 
org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred 
org-element--headline-parse-title (t) t] :archivedp [org-element-deferred 
org-element--headline-parse-title (t) t] :commentedp [org-element-deferred 
org-element--headline-parse-title (t) t]))"

Reply via email to