diff --git a/lisp/ox.el b/lisp/ox.el index 22df88759..5c0a8f242 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -1435,7 +1435,7 @@ for export. Return options as a plist." ;; property is the keyword with "EXPORT_" appended to it. (org-with-wide-buffer ;; Make sure point is at a heading. - (if (org-at-heading-p) (org-up-heading-safe) (org-back-to-heading t)) + (org-back-to-heading t) (let ((plist ;; EXPORT_OPTIONS are parsed in a non-standard way. Take ;; care of them right from the start. diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el index 134345521..47f3f6075 100644 --- a/testing/lisp/test-ox.el +++ b/testing/lisp/test-ox.el @@ -391,7 +391,7 @@ Paragraph" (plist-get (org-export-get-environment nil t) :date)))) ;; Still grab correct options when section above is empty. (should - (equal '("H1") + (equal '("H12") (org-test-with-temp-text "* H1\n** H11\n** H12" (plist-get (org-export-get-environment nil t) :title)))) ;; More than one property can refer to the same node property.