ox: Add :input-buffer to communication channel

* lisp/ox.el (org-export--get-buffer-attributes): Add :input-buffer
  property.
This commit is contained in:
Nicolas Goaziou 2013-11-02 14:33:24 +01:00
parent baf8457505
commit 205e586dd1
1 changed files with 6 additions and 1 deletions

View File

@ -1333,6 +1333,10 @@ The back-end could then be called with, for example:
;; - category :: tree ;; - category :: tree
;; - type :: list of elements and objects ;; - type :: list of elements and objects
;; ;;
;; + `:input-buffer' :: Original buffer name.
;; - category :: option
;; - type :: string
;;
;; + `:input-file' :: Full path to input file, if any. ;; + `:input-file' :: Full path to input file, if any.
;; - category :: option ;; - category :: option
;; - type :: string or nil ;; - type :: string or nil
@ -1787,7 +1791,8 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored."
"Return properties related to buffer attributes, as a plist." "Return properties related to buffer attributes, as a plist."
;; Store full path of input file name, or nil. For internal use. ;; Store full path of input file name, or nil. For internal use.
(let ((visited-file (buffer-file-name (buffer-base-buffer)))) (let ((visited-file (buffer-file-name (buffer-base-buffer))))
(list :input-file visited-file (list :input-buffer (buffer-name (buffer-base-buffer))
:input-file visited-file
:title (if (not visited-file) (buffer-name (buffer-base-buffer)) :title (if (not visited-file) (buffer-name (buffer-base-buffer))
(file-name-sans-extension (file-name-sans-extension
(file-name-nondirectory visited-file)))))) (file-name-nondirectory visited-file))))))