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
;; - type :: list of elements and objects
;;
;; + `:input-buffer' :: Original buffer name.
;; - category :: option
;; - type :: string
;;
;; + `:input-file' :: Full path to input file, if any.
;; - category :: option
;; - 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."
;; Store full path of input file name, or nil. For internal use.
(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))
(file-name-sans-extension
(file-name-nondirectory visited-file))))))