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.
This commit is contained in:
Nicolas Goaziou 2021-11-19 09:34:37 +01:00
parent 35e21b6161
commit a51e4dc710
1 changed files with 6 additions and 0 deletions

View File

@ -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