diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-04-20 11:12:44 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-04-21 12:13:37 +0200 |
commit | 60b84d7f4bbe22f314278736536f6a425a6ac376 (patch) | |
tree | 6ebaf3a4db894db9f9169bcf172598a5b7a74b56 | |
parent | 32bd764573bb685d1549d81ad9ea77edc2a17406 (diff) | |
download | org-mode-60b84d7f4bbe22f314278736536f6a425a6ac376.tar.gz |
org-footnote: Fix positionning in HTML export without a footnote section
* lisp/org-footnote.el (org-footnote-normalize): Fix positionning in
HTML export without a footnote section.
-rw-r--r-- | lisp/org-footnote.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 9319e08..a9ba8d7 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -716,8 +716,8 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': ((and org-footnote-section (eq major-mode 'org-mode)) (goto-char (point-min)) (if (re-search-forward - (concat "^\\*[ \t]+" (regexp-quote org-footnote-section) - "[ \t]*$") nil t) + (concat "^\\*[ \t]+" (regexp-quote org-footnote-section) + "[ \t]*$") nil t) (delete-region (match-beginning 0) (org-end-of-subtree t t))) ;; A new footnote section is inserted by default at the end of ;; the buffer. @@ -727,7 +727,14 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': (unless (bolp) (newline))) ;; No footnote section set: Footnotes will be added at the end ;; of the section containing their first reference. - ((eq major-mode 'org-mode)) + ;; Nevertheless, in an export situation, set insertion point to + ;; `point-max' by default. + ((eq major-mode 'org-mode) + (when export-props + (goto-char (point-max)) + (skip-chars-backward " \r\t\n") + (forward-line) + (delete-region (point) (point-max)))) (t ;; Remove any left-over tag in the buffer, if one is set up. (when org-footnote-tag-for-non-org-mode-files |