mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-27 17:32:52 +00:00
Fix bugs related to includes files in new export system
This commit is contained in:
parent
42c96c4c26
commit
c8d9f1438f
|
@ -3038,10 +3038,12 @@ Nil values returned from FUN are ignored in the result."
|
|||
;; included file becomes a direct child of
|
||||
;; the current headline in the buffer.
|
||||
:headline-offset
|
||||
,(- (+ (plist-get
|
||||
(plist-get --local :inherited-properties)
|
||||
:level)
|
||||
(or (plist-get --local :headline-offset) 0))
|
||||
,(- (let ((parent
|
||||
(org-export-get-parent-headline
|
||||
--blob --local)))
|
||||
(if (not parent) 0
|
||||
(org-export-get-relative-level
|
||||
parent --local)))
|
||||
(1- (org-export-get-min-level
|
||||
--data --local))))))))
|
||||
;; Limiting recursion to greater elements, and --BLOB
|
||||
|
|
|
@ -2267,17 +2267,17 @@ Return the transcoded string."
|
|||
data backend
|
||||
(org-combine-plists
|
||||
info
|
||||
;; Store full path of already included files to avoid
|
||||
;; recursive file inclusion.
|
||||
;; Store full path of already included files to avoid recursive
|
||||
;; file inclusion.
|
||||
`(:included-files
|
||||
,(cons (expand-file-name file) (plist-get info :included-files))
|
||||
;; Ensure that a top-level headline in the included
|
||||
;; file becomes a direct child of the current headline
|
||||
;; in the buffer.
|
||||
;; Ensure that a top-level headline in the included file
|
||||
;; becomes a direct child of the current headline in the
|
||||
;; buffer.
|
||||
:headline-offset
|
||||
,(- (+ (org-element-get-property
|
||||
:level (org-export-get-parent-headline keyword info))
|
||||
(plist-get info :headline-offset))
|
||||
,(- (let ((parent (org-export-get-parent-headline keyword info)))
|
||||
(if (not parent) 0
|
||||
(org-export-get-relative-level parent info)))
|
||||
(1- (org-export-get-min-level data info)))))))))
|
||||
|
||||
(defun org-export-get-file-contents (file &optional lines)
|
||||
|
|
Loading…
Reference in a new issue