forked from mirrors/org-mode
org-export--get-subtree-options: Do not jump to parent subtree
* lisp/ox.el: Never jump to parent heading even when point is at an existing heading. * testing/lisp/test-ox.el (test-org-export/get-subtree-options): Fix test assuming that current subtree may include parent. Reported-by: Kaushal Modi <kaushal.modi@gmail.com> Link: https://orgmode.org/list/CAFyQvY3mxi4DRTS+W-AX7bFELVujqH4DODEYPy3hyGRRuMEPSw@mail.gmail.com
This commit is contained in:
parent
eed4708b66
commit
9276219103
|
@ -1435,7 +1435,7 @@ for export. Return options as a plist."
|
||||||
;; property is the keyword with "EXPORT_" appended to it.
|
;; property is the keyword with "EXPORT_" appended to it.
|
||||||
(org-with-wide-buffer
|
(org-with-wide-buffer
|
||||||
;; Make sure point is at a heading.
|
;; 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
|
(let ((plist
|
||||||
;; EXPORT_OPTIONS are parsed in a non-standard way. Take
|
;; EXPORT_OPTIONS are parsed in a non-standard way. Take
|
||||||
;; care of them right from the start.
|
;; care of them right from the start.
|
||||||
|
|
|
@ -391,7 +391,7 @@ Paragraph"
|
||||||
(plist-get (org-export-get-environment nil t) :date))))
|
(plist-get (org-export-get-environment nil t) :date))))
|
||||||
;; Still grab correct options when section above is empty.
|
;; Still grab correct options when section above is empty.
|
||||||
(should
|
(should
|
||||||
(equal '("H1")
|
(equal '("H12")
|
||||||
(org-test-with-temp-text "* H1\n** H11\n** H12<point>"
|
(org-test-with-temp-text "* H1\n** H11\n** H12<point>"
|
||||||
(plist-get (org-export-get-environment nil t) :title))))
|
(plist-get (org-export-get-environment nil t) :title))))
|
||||||
;; More than one property can refer to the same node property.
|
;; More than one property can refer to the same node property.
|
||||||
|
|
Loading…
Reference in a new issue