forked from mirrors/org-mode
ox: Store export options in :export-options porperty
* lisp/ox.el (org-export-as): Store export options in :export-options porperty within communication channel. This patch allows export options activated to be available to export back-ends.
This commit is contained in:
parent
5c4c8afe07
commit
d3b8194069
15
lisp/ox.el
15
lisp/ox.el
|
@ -1139,6 +1139,12 @@ The back-end could then be called with, for example:
|
|||
;; - category :: option
|
||||
;; - type :: list of strings
|
||||
;;
|
||||
;; + `:export-options' :: List of export options available for current
|
||||
;; process.
|
||||
;; - category :: none
|
||||
;; - type :: list of symbols, among `subtree', `body-only' and
|
||||
;; `visible-only'.
|
||||
;;
|
||||
;; + `:exported-data' :: Hash table used for memoizing
|
||||
;; `org-export-data'.
|
||||
;; - category :: tree
|
||||
|
@ -2827,7 +2833,14 @@ Return code as a string."
|
|||
(narrow-to-region (point) (point-max))))
|
||||
;; Initialize communication channel with original buffer
|
||||
;; attributes, unavailable in its copy.
|
||||
(let ((info (org-export--get-buffer-attributes)) tree)
|
||||
(let ((info (org-combine-plists
|
||||
(list :export-options
|
||||
(delq nil
|
||||
(list (and subtreep 'subtree)
|
||||
(and visible-only 'visible-only)
|
||||
(and body-only 'body-only))))
|
||||
(org-export--get-buffer-attributes)))
|
||||
tree)
|
||||
;; Update communication channel and get parse tree. Buffer
|
||||
;; isn't parsed directly. Instead, a temporary copy is
|
||||
;; created, where include keywords, macros are expanded and
|
||||
|
|
Loading…
Reference in New Issue