summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-01-14 00:16:57 -0500
committerKyle Meyer <kyle@kyleam.com>2021-01-14 00:16:57 -0500
commitedda21e9312be2af5566286bcd9042fbbec56725 (patch)
tree0ec16d1d398a62de87c660ca5d729df5f925051f
parent86ad8d2791ac141bc0b39e21f5e114387fd817a0 (diff)
parent1806abdc396d4987ed5e563c0204a13d14c25e1d (diff)
downloadorg-mode-edda21e9312be2af5566286bcd9042fbbec56725.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-footnote.el2
-rw-r--r--testing/lisp/test-org-archive.el8
-rw-r--r--testing/lisp/test-org-footnote.el15
3 files changed, 19 insertions, 6 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 3d42421..47ad4aa 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -704,7 +704,7 @@ function doesn't move point."
(concat "^\\*+[ \t]+" (regexp-quote org-footnote-section) "[ \t]*$")
nil t))
(goto-char (match-end 0))
- (forward-line)
+ (org-end-of-meta-data t)
(unless (bolp) (insert "\n")))
(t (org-footnote--clear-footnote-section)))
(when (zerop (org-back-over-empty-lines)) (insert "\n"))
diff --git a/testing/lisp/test-org-archive.el b/testing/lisp/test-org-archive.el
index 71ab427..d24a547 100644
--- a/testing/lisp/test-org-archive.el
+++ b/testing/lisp/test-org-archive.el
@@ -63,7 +63,7 @@
;; Test in buffer target with no additional subheadings...
(should
(string-match-p
- (regexp-quote "*** 2020-07-05 Sunday\n**** a")
+ (regexp-quote (format-time-string "*** 2020-07-05 %A\n**** a"))
(org-test-with-temp-text-in-file "* a\n"
(let ((org-archive-location "::datetree/"))
(org-archive-subtree)
@@ -71,7 +71,7 @@
;; ... and with `org-odd-levels-only' non-nil.
(should
(string-match-p
- (regexp-quote "***** 2020-07-05 Sunday\n******* a")
+ (regexp-quote (format-time-string "***** 2020-07-05 %A\n******* a"))
(org-test-with-temp-text-in-file "* a\n"
(let ((org-archive-location "::datetree/")
(org-odd-levels-only t))
@@ -80,7 +80,7 @@
;; Test in buffer target with an additional subheading...
(should
(string-match-p
- (regexp-quote "*** 2020-07-05 Sunday\n**** a\n***** b")
+ (regexp-quote (format-time-string "*** 2020-07-05 %A\n**** a\n***** b"))
(org-test-with-temp-text-in-file "* b\n"
(let ((org-archive-location "::datetree/* a"))
(org-archive-subtree)
@@ -88,7 +88,7 @@
;; ... and with `org-odd-levels-only' non-nil.
(should
(string-match-p
- (regexp-quote "***** 2020-07-05 Sunday\n******* a\n********* b")
+ (regexp-quote (format-time-string "***** 2020-07-05 %A\n******* a\n********* b"))
(org-test-with-temp-text-in-file "* b\n"
(let ((org-archive-location "::datetree/* a")
(org-odd-levels-only t))
diff --git a/testing/lisp/test-org-footnote.el b/testing/lisp/test-org-footnote.el
index eca24d3..50a4307 100644
--- a/testing/lisp/test-org-footnote.el
+++ b/testing/lisp/test-org-footnote.el
@@ -138,7 +138,20 @@
(org-test-with-temp-text
"Paragraph<point>\n# Local Variables:\n# foo: t\n# End:"
(let ((org-footnote-section "Footnotes")) (org-footnote-new))
- (buffer-string)))))
+ (buffer-string))))
+ (should
+ (equal "Para[fn:1]
+* Footnotes
+:properties:
+:custom_id: id
+:end:
+
+\[fn:1]"
+ (org-test-with-temp-text
+ "Para<point>\n* Footnotes\n:properties:\n:custom_id: id\n:end:"
+ (let ((org-footnote-section "Footnotes"))
+ (org-footnote-new))
+ (org-trim (buffer-string))))))
(ert-deftest test-org-footnote/delete ()
"Test `org-footnote-delete' specifications."