Browse Source

ox-icalendar: Fix error dangling footnotes

* lisp/ox-icalendar.el (icalendar): Add an inner-template function so
as to not use "ox-ascii"'s.
(org-icalendar-inner-template): New function.

This fixes <https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg01478.html>
and <http://lists.gnu.org/r/emacs-orgmode/2021-11/msg00395.html>.

Footnote definition is lost, but references are already removed from
the description anyway, so the problem is not worse.
Nicolas Goaziou 3 years ago
parent
commit
a51e4dc710
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lisp/ox-icalendar.el

+ 6 - 0
lisp/ox-icalendar.el

@@ -280,6 +280,7 @@ re-read the iCalendar file.")
 		     (footnote-definition . ignore)
 		     (footnote-reference . ignore)
 		     (headline . org-icalendar-entry)
+                     (inner-template . org-icalendar-inner-template)
 		     (inlinetask . ignore)
 		     (planning . ignore)
 		     (section . ignore)
@@ -805,6 +806,11 @@ END:VALARM\n"
 
 ;;;; Template
 
+(defun org-icalendar-inner-template (contents _)
+  "Return document body string after iCalendar conversion.
+CONTENTS is the transcoded contents string."
+  contents)
+
 (defun org-icalendar-template (contents info)
   "Return complete document string after iCalendar conversion.
 CONTENTS is the transcoded contents string.  INFO is a plist used