1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

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:
Ihor Radchenko 2022-10-18 12:07:37 +08:00
parent eed4708b66
commit 9276219103
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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<point>"
(plist-get (org-export-get-environment nil t) :title))))
;; More than one property can refer to the same node property.