kjambunathan / org-mode-ox-odt

The Authoritative fork of Org mode's ODT exporter
GNU General Public License v3.0
47 stars 9 forks source link

"Lisp nesting exceeds max-lisp-evel-deapth" while exporting an Org file to ODT #281

Open kjambunathan opened 1 week ago

kjambunathan commented 1 week ago

From https://lists.gnu.org/archive/html/emacs-orgmode/2024-11/msg00108.html

running C-u C-c C-x f s fails with "Lisp nesting exceeds max-lisp-evel-deapth". I have tried increasing it very high, & emacs crashed with a stack overflow. (all export fails too.) It is probably due to file size. I have also found that on some files (mainly larger ones), export to ODT produces a corrupted output file. email me for examples. Thank you for the useful emacs. p. s. for my file`s text to be displayed, the font has to be one that sopports Hebrew.

zipqSRI3qMm0d.zip

kjambunathan commented 1 week ago

https://github.com/user-attachments/files/17825568/zipqSRI3qMm0d.zip

This is the most simplified version of the above test file

dafsum.org.txt

A quick look suggests that the nesting of [fn:94] within [fn:222], and vice versa

See Re: [O] ODT export: Issues with `org-export-footnote-first-reference-p' for previous issue and suggested workarounds


** מכירת דברים מסוכנים
המשנה אומרת, אין למכור להם דובים ואריות וכל דבר שנזק לרבים. וכן אין בונים מבנים המשמשים להוצאה להורג. אך יכול לבנות עמם מבנים אחרים - בימוס[fn:94] ומרחץ. וכשמגיע לחלק ששמים בו ע"ז, אסור.

* Footnotes

[fn:222]‏הב"ח /יו"ד קמג,א/ מחשבן שזה לשיטתו שמותר לבנות מקום שהגוי ישים ע"ז, ולכן אם זה רק בית שבו הע"ז תהא מותר להבנות. אך ר"י חולק על כך, ולדבריו אסור ממ"נ. (ראה [fn:94]).

[fn:94]‏דהיינו, לרש"י אבן שמקטירים עליה (ומותר כי תשמיש דתשמיש), ולתוס' מרחץ - שלא לשם ע"ז (ורק היה דרכם להעמיד שם ע"ז), ומביא רשב"ם שזה בנין שלא לשם ע"ז. לריטב"א זה בנין או מרחץ חם. (והסיפא היא מחמת שהיו רגילים להעמיד ע"ז בבניניהם.) *נק"מ לדינא*, שלרש"י יכול לבנות את חלקי הבניין שאינם ע"ז אף כשהם לשם ע"ז, ולשא"ר לא /טור יו"ד קמג/. ראה [fn:222].

# Local Variables:
# mode: org
# End:
kjambunathan commented 6 days ago

Exporting the org snippet you see below to html also results in

org-element--property: Lisp nesting exceeds `max-lisp-eval-depth'

So, this is an issue that has to be addressed in org core.

M-x org-version is

Org mode version 9.7.14 (release_9.7.14-628-g381f1e @ /home/kjambunathan/src/emacs-extras/org-mode-ox-odt/lisp/)

Since this repo only touches ODT exporter, a bug in HTML export signifies a bug org-9.7.14 version of Org that comes with vanilla Emacs.


* Sunt aute laborum velit

Occaecat cupidatat occaecat do non quis veniam, reprehenderit lorem
nostrud magna culpa.[fn:94]

* Footnotes

[fn:222] Veniam, pariatur ea magna adipiscing ut sint commodo.[fn:94]

[fn:94] Sunt voluptate enim amet, aliqua fugiat nisi aliquip.[fn:222].

# Local Variables:
# mode: org
# End:
kjambunathan commented 6 days ago

ZIP file for this bug report :

lo-syntax-error-with-nested-footnote-definition.zip

See LO Bug#163974- (May be ODF-spec related) Nested Footnotes: LO reports Read Error but ODFValidator is quite happy


LO reports corrupt ODT file when exporting the following org snippet.

* Labore minim anim eiusmod mollit et

Sunt sed ullamco amet, velit nulla anim dolore officia reprehenderit occaecat adipiscing magna elit.[fn:94]

* Footnotes

[fn:222] Ipsum deserunt duis aliqua laboris est ullamco veniam, minim. Voluptate proident, aute tempor ut ad fugiat laboris sit eiusmod nostrud duis proident, ex pariatur.  Ad fugiat nostrud ex incididunt proident, minim do.  Officia pariatur et enim cillum esse ad adipiscing eu labore velit esse laborum eu nisi.

[fn:94] Laboris nulla lorem ea tempor anim do sunt dolor occaecat voluptate aliqua commodo ut.[fn:222]

00-lo-format-error-for-nested-footnote-definition

kjambunathan commented 3 days ago

See

See also

https://lists.gnu.org/archive/html/emacs-orgmode/2024-11/msg00166.html specifically commit https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4ff4828944